Closed yakhyo closed 1 month ago
This is a problem because there is no voice tag in ssml of azure tts.
livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/tts.py
This is resolved by changing the _synthsize
function of 180 lines.
def _synthesize() -> speechsdk.SpeechSynthesisResult:
if self._opts.prosody:
ssml = f'<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="{self._opts.language or "en-US"}">'
voice_ssml = f'<voice name="{self._opts.voice}">'
prosody_ssml = "<prosody"
if self._opts.prosody.rate:
prosody_ssml += f' rate="{self._opts.prosody.rate}"'
if self._opts.prosody.volume:
prosody_ssml += f' volume="{self._opts.prosody.volume}"'
if self._opts.prosody.pitch:
prosody_ssml += f' pitch="{self._opts.prosody.pitch}"'
prosody_ssml += ">"
ssml += voice_ssml
ssml += prosody_ssml
ssml += self._text
ssml += "</prosody></voice></speak>"
return synthesizer.speak_ssml_async(ssml).get() # type: ignore
return synthesizer.speak_text_async(self._text).get() # type: ignore
Hey, seems like this was fixed inside this PR https://github.com/livekit/agents/pull/929
Unfortunately, it did not solve the problem. I still cannot pass config file. what might be I am doing wrong in here? thank you
https://github.com/livekit/agents/pull/929 Now that the change has been merged, why don't you get the project source code again and run it?
thank you @harmlessman
Hi, thank you for this nice tool.
I was using Azure TTS and set some custom config but getting error from the lib packages. I was curious how to tackle with this issue?
my current code snippet:
++++++++++++++++++++ below is Azure TTS class and we can pass the config here:+++++++++++++
+++++++++++++++++ when I do so there is a
ValueError
++++++++++++++++++++would appreciate any help for this.