Skip to content

Sarvam's WebSocket API decoder format mismatch#5191

Open
DharanHaarish wants to merge 1 commit intolivekit:mainfrom
DharanHaarish:hd/sarvam-plugin-fix
Open

Sarvam's WebSocket API decoder format mismatch#5191
DharanHaarish wants to merge 1 commit intolivekit:mainfrom
DharanHaarish:hd/sarvam-plugin-fix

Conversation

@DharanHaarish
Copy link

Summary

Fix mime_type mismatch in Sarvam TTS WebSocket streaming path. The SynthesizeStream class was declaring audio/wav but Sarvam's WebSocket API actually returns MP3 audio, causing the LiveKit WAV decoder to fail on MPEG bytes.

Changes

  • Changed mime_type from "audio/wav" to "audio/mp3" in SynthesizeStream._run()

Notes

  • The HTTP REST path (ChunkedStream) correctly handles WAV format
  • The WebSocket path was incorrectly assuming the same format without verification
  • This aligns with how other plugins (AWS, Resemble) handle MP3 streams

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


DharanHaarish seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants