mugib_voice 0.4.0
mugib_voice: ^0.4.0 copied to clipboard
Official Flutter SDK for Mugib voice agents. One client for VAPI and Google Gemini Live — pass apiKey and agentId only.
0.4.0 #
- Feat: session resumption — Gemini Live calls now preserve conversation
context across network drops. The SDK stores the resumption handle sent by
Google (via the Mugib server) and reattaches automatically on reconnect.
No new API surface; existing
maxReconnectAttemptscontrols retry count. - Feat: proactive reconnect on
goAway— when Google signals an imminent disconnect, the SDK reconnects immediately using the latest handle. - Backend:
sessionResumptionis now enabled in the Gemini setup message; the server relaysresumeandgoawayframes and skips the greeting on resumed connections.
0.3.1 #
- Fix: the
start()fallback path now carriesMugibVoiceErrorCode.unknownand emits onerrorEvents(previously only thrown without a code). - Docs: full README reference for all
MugibVoiceErrorCodevalues,MugibCallMetricsfields, and the Gemini Live auto-reconnect behavior.
0.3.0 #
- Feat: structured errors — new
MugibVoiceErrorCodeenum anderrorEventsstream (Stream<MugibVoiceError>) alongside the existingerrorsstring stream.MugibVoiceExceptionnow carries acode. - Feat: latency metrics — new
metricsstream andcurrentMetrics(MugibCallMetrics) reporting time-to-first-audio and per-response latency (Gemini Live) / connection latency (VAPI). - Feat: call timer —
callDurationgetter anddurationTicksstream. - Feat: automatic reconnect for Gemini Live after an unexpected WebSocket drop
(configurable via
maxReconnectAttempts/reconnectBackoff). - Feat: tunable playback latency for Gemini Live via
feedThresholdFrames(default lowered from ~333ms to ~166ms).
0.2.5 #
- Polish: avoid duplicate error events during Gemini session setup failure.
0.2.4 #
- Fix:
start()resets toidlewhen token fetch or session setup fails (retry withoutend()). - Fix: Gemini
start()now awaits serverready(parity with VAPIcall-startwait).
0.2.3 #
- README/docs: Mugib-centric integration guide;
provideris display-only.
0.2.2 #
- Same reliability fixes as 0.2.1 (republish with audit-complete code).
0.2.1 #
- Fix: reuse same
MugibVoiceClientafterend()(session cleanup). - Fix: rollback failed
start()so retry works. - Fix: VAPI awaits
call-start/ surfacescall-error; mic permission pre-check. - Fix: Gemini
readysetup timeout (25s). - Fix: HTTP client request timeout (30s).
0.2.0 #
- Unified SDK: VAPI + Gemini Live in one
MugibVoiceClient(fetches/tokenautomatically). - Bundled
vapipackage for VAPI agents — app only needsapiKey+agentId. MugibVoice.listAgents()— lists active agents withproviderfor picker UI.MugibAgentSummary/MugibVoiceTokenmodels.- Verified:
flutter analyze(0 issues),flutter test(10 passing).
0.1.0 #
- Initial release.
MugibVoiceClientwith real-time mic capture (PCM 16 kHz), playback (PCM 24 kHz), live transcripts, call-state stream, mute, and barge-in interruption handling.- Gemini Live WebSocket stream via Mugib backend.
- Verified:
flutter analyze(0 issues),flutter test(5 passing). - Fixes: iOS
playAndRecordsession, mic gated untilready, cleanup race guard,AudioRecorder.dispose(), ambiguousIosAudioCategoryimport, async PCM feed.