Sarvam TTS - error decoding WAV audio

I’m using Sarvam for STT and TTS and I got an error that says "livekit.agents error decoding WAV audio ", seems like Sarvam TTS is giving outputs in mp3. How to fix this. I’m using v1.5.1.

I saw the livekit codebase and see its supporting mp3 too but not sure whay I’m facing this issue:
ALLOWED_OUTPUT_AUDIO_CODECS: set[str] = {

"mp3",

“opus”,

“flac”,

“aac”,

“wav”,

}
**My code:
**
stt=sarvam.STT(model=config.stt_model, language=config.stt_language, mode=“transcribe”, flush_signal=True ),

    llm=inference.LLM(

        model=config.gemini_llm_model,

    ),

    tts=sarvam.TTS(

            target_language_code=config.tts_language,

            model=config.tts_model,

            speaker=config.tts_voice,

            pace=1.0,

            temperature=0.61,

            output_audio_codec='mp3'

    ),

I believe this was fixed in fix: allow codec format specification via the user for Sarvam TTS by pUrGe12 · Pull Request #5209 · livekit/agents · GitHub which I would anticipate being in the next release (though it’s not present in 1.5.1)

Hey @darryncampbell ,

Can you please share when can we expect the latest release?

Hey @darryncampbell , Would you happen to have an estimated timeline for when this fix might be released, and which version it’s expected to be included in?

This fix will be in the next release, looks like it just narrowly missed inclusion in 1.5.1. I don’t have a specific date I can share I’m afraid as it looks like the team are trying to align with a partner release, but I hope soon.

Thanks a lot for the response @darryncampbell . Hopefully we will release this with in a week or so as many people are waiting for this change.

1 Like

Hey @darryncampbell Could you please share any updates on the issue above? I would appreciate your update. Thanks

I don’t have an exact date when the next release will be but it should be soon. I’ll put in a request.

Apologies for the delay, but Agents 1.5.2 was just released: