mugib_sdk 1.0.23 copy "mugib_sdk: ^1.0.23" to clipboard
mugib_sdk: ^1.0.23 copied to clipboard

Official Flutter SDK for Mugib chat sessions, voice agents, and session payload with one apiKey.

Changelog #

1.0.23 #

  • Voice: lower playback buffer default (960 frames ≈ 40ms @ 24kHz, was 166ms) for faster time-to-first-audio and response latency
  • Voice: parallel WebSocket connect + playback setup during call start

1.0.22 #

  • Voice: echo_guard_ms and barge_in_threshold come from Mugib /token and WebSocket ready — no per-app tuning; Admin settings are the single source of truth
  • Voice: MugibVoiceToken includes server echo-guard fields; VoiceEchoGuard.applyServerConfig

1.0.21 #

  • Voice: echo guard — suppresses mic uplink during agent playback unless input level exceeds a barge-in threshold; sends client_state to the server every ~150 ms
  • Voice: preferSpeaker (default false) on MugibVoiceClient / MugibVoiceSession — earpiece/receiver routing on iOS and Android for cleaner AEC; opt in to loudspeaker when needed (preferSpeaker: true)
  • Voice: VoiceEchoGuard — coordinates client-side gating with VoicePlaybackCoordinator (grace window + level-based barge-in)
  • Voice: Android speakerphone follows preferSpeaker instead of always forcing speaker
  • Voice: iOS audio session no longer forces defaultToSpeaker unless preferSpeaker is true
  • Server (Mugib backend): matching uplink gate via voice.echo_guard_ms and voice.barge_in_threshold settings (migration 130)
  • Voice: MugibVoiceService.client() — forwards preferSpeaker to MugibVoiceClient

Upgrade note: If you previously worked around echo with allow_interruption: false in Portal, you can re-enable barge-in and rely on echo guard instead.

1.0.20 #

  • Voice: rollback to the stable 1.0.12 stack — removes Silero VAD, uplink level gates, and post-greeting mic blocks that caused cut-offs, delay, and silent uplink on iOS/web
  • Voice: mic uplink stays open when barge-in is enabled; pauses only when the agent has interruption disabled and PCM is still playing
  • Voice: VoicePlaybackCoordinator defers listening until agent audio drains

1.0.12 #

  • Voice: defer listening UI/state until buffered agent PCM finishes playing, so false VAD/echo signals no longer cut agent speech mid-sentence
  • Voice: wire allowInterruption from /token — mic uplink stays open when barge-in is enabled (default); uplink pauses during agent playback only when the agent has interruption disabled
  • Voice: VoicePlaybackCoordinator keeps playback and call state in sync; real interrupted events still flush audio immediately for user barge-in

1.0.11 #

  • Voice: MugibVoiceClient.inputLevel — smoothed mic input level stream (0.0–1.0) for building a live level meter so users can confirm their mic is captured
  • Example: full voice-call screen — connect/end, mute, live transcript bubbles, call state pill + timer, animated mic orb + input level meter, and friendly error UI mapped from MugibVoiceErrorCode
  • Deps: upgrade web_socket_channel 2 → 3, record 5 → 6, http → 1.5, flutter_lints 4 → 5 (no breaking public API changes)
  • Deps: drop unused permission_handler — microphone permission is handled by record.hasPermission(), so consumers no longer pull its heavier Android setup

1.0.10 #

  • Voice: MugibTranscript.partial — server streams incremental STT; replace the last line for the same role when partial is true
  • Voice: MugibVoiceClient.transcriptLines — ready-to-render transcript list (no manual partial handling in your UI)
  • Voice: MugibTranscriptBuffer helper for custom transcript UIs
  • Requires Mugib backend with accumulated voice transcript + partial WebSocket field

1.0.9 #

  • Fix: configure VoIP audio session for speaker-mode voice chat (like ChatGPT/Gemini) — iOS voiceChat + defaultToSpeaker, Android VOICE_COMMUNICATION + MODE_IN_COMMUNICATION + speakerphone for hardware AEC
  • Add audio_session dependency; mic stays open during agent speech (barge-in is enforced server-side via Portal allow_interruption, not in the SDK)

1.0.8 #

  • Fix: stop clearing agent audio on state: listening (only interrupted clears playback)
  • Fix: pause mic uplink while agent speaks when allow_interruption is false (reduces phone echo)
  • Read allow_interruption from /token response (voice agent setting)

1.0.7 #

  • Fix: voice userContext payload — send expect_context=1 on WebSocket URL so the server waits for the context frame (matches browser widget reliability)
  • Fix: open WebSocket before PCM playback setup for faster context delivery
  • Requires backend with voice payload/KB fixes (expect_context, sync KB inject)

1.0.6 #

  • Docs: explain proactive triggers — configured in Portal (projects/{id}/triggers), optional read via getWidgetTriggers(); returns [] when none configured
  • Docs: remove legacy mugib_voice package references — use mugib_sdk only
  • Requires backend with fix for GET /api/v1/widget/triggers (200 + empty array, not 500)

1.0.5 #

  • Docs: sync install version to ^1.0.4+ across repo guides
  • Add @Deprecated isGeminiLive alias → isMugibVoiceAi (migration from 1.0.3)
  • Remove stale gemini_session.dart from package tree

1.0.4 #

  • Fix: SSE streaming no longer drops spaces between tokens — parse data: lines per the SSE spec (strip at most one optional separator space, not all leading whitespace). Fixes merged words in sendStream().

1.0.3 #

  • Rebrand voice stack as Mugib Voice AI in docs and public API (remove Gemini naming)
  • Rename GeminiVoiceSessionMugibVoiceSession (internal)
  • Rename isGeminiLiveisMugibVoiceAi on agent/token models

1.0.2 #

  • Docs: clarify SDK scope — app connects to Agent; KB/MCP/tools run server-side
  • Docs: move handoff poll and tool approval buttons to optional Advanced section
  • Docs: minimal quick-start example (send() + send("yes") for confirmations)
  • Code comments: label poll() / confirmTool() as optional UI helpers

1.0.1 #

  • Focus SDK on chat + voice + session payload; widget config/triggers read-only on [MugibClient]
  • Remove KB/stats from main client facade (advanced via [MugibApiClient] / [MugibKbService])
  • Add getWidgetTriggers() for /api/v1/widget/triggers

1.0.0 #

  • Unified mugib_sdk package: chat + voice + KB + widget APIs
  • Chat: sessions, messages (JSON + SSE), payload, handoff poll, tool confirmations, conversions, CSAT
  • Voice: Mugib Voice AI calls (from former mugib_voice)
  • KB: list / add / update / delete via tenant API
  • Widget config, stats, metrics
1
likes
150
points
1.1k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Official Flutter SDK for Mugib chat sessions, voice agents, and session payload with one apiKey.

Homepage
Repository (GitHub)
View/report issues

Topics

#ai #chatbot #voice #sdk #mugib-voice

License

MIT (license)

Dependencies

audio_session, flutter, flutter_pcm_sound, http, record, web_socket_channel

More

Packages that depend on mugib_sdk