feat(realtime): add Meta Muse Voice transcription - #39395
Conversation
Greptile SummaryThe PR adds Meta Muse Voice realtime transcription routing and translates between OpenAI-compatible transcription events and Muse’s binary PCM protocol.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| litellm/llms/meta/realtime/handler.py | Implements the Muse WebSocket adapter, secure endpoint validation, handshake, paced PCM forwarding, bounded buffering, and connection cleanup; no eligible unresolved follow-up issue remains. |
| litellm/llms/meta/realtime/transformation.py | Validates Muse session configuration and translates provider transcription events into OpenAI-compatible events. |
| litellm/litellm_core_utils/realtime_streaming.py | Adds provider-supplied usage flushing and content-sanitized logging for privacy-sensitive transcription sessions. |
| litellm/realtime_api/main.py | Integrates Meta Muse into realtime provider dispatch and credential resolution. |
| tests/test_litellm/llms/meta/realtime/test_meta_realtime_handler.py | Exercises adapter validation and lifecycle behavior with injected transports; the insecure URL literal is explicitly verified as rejected and cannot make a network request. |
| tests/test_litellm/llms/meta/realtime/test_meta_realtime_transformation.py | Covers session parsing and Muse-to-OpenAI transcription event transformation. |
Reviews (2): Last reviewed commit: "fix(realtime): bound Muse audio before d..." | Re-trigger Greptile
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
|
Companion documentation PR: BerriAI/litellm-docs#1138 It documents |
|
@greptileai Please re-review the latest commit. The oversized base64 allocation finding is fixed in 298a729; the direct connector rationale is documented in the inline reply. |
TLDR
Problem this solves:
How it solves it:
meta/muse-voice-transcribe-1.0realtime routingUser Flow
Before: a developer cannot use Muse Voice through LiteLLM's realtime endpoint
WSS /v1/realtime?model=meta/muse-voice-transcribe-1.0&intent=transcriptionAfter: the same developer receives OpenAI-compatible transcription events from Muse
MODEL_API_KEYand starts the proxyWSS /v1/realtime?model=meta/muse-voice-transcribe-1.0&intent=transcriptionsession.update, paced PCM16 audio, andinput_audio_buffer.commitRelevant issues
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Shared setup:
meta/muse-voice-transcribe-1.0WSS /v1/realtime?model=meta/muse-voice-transcribe-1.0&intent=transcriptionweather_question_24k.wav, mono PCM16 at 24 kHzwss://api.meta.ai/v1/asr/realtimeBefore (d2fe8af)
After (298a729)
LITELLM_LOCAL_MODEL_COST_MAP=Trueand server-sideMODEL_API_KEYsession.created,session.updated,speech_started, transcription deltas,input_audio_buffer.committed,speech_stopped, andcompletedWhat is the weather in Paris??1.36seconds1000Local validation:
185 passed, 9 warningsin the focused realtime suitegit diff --checkpassedType
🆕 New Feature
Caveats (if any)
Medium
Low
MODEL_API_KEYis preferred;META_API_KEYremains a fallbackFinal Attestation