services(deepgram): fixed DeepgramTTSService

This commit is contained in:
Aleix Conchillo Flaqué
2024-06-03 07:53:46 -07:00
parent dd3b4083eb
commit 43516f84fe
2 changed files with 7 additions and 2 deletions

View File

@@ -32,8 +32,7 @@ class DeepgramTTSService(TTSService):
async def run_tts(self, text: str) -> AsyncGenerator[Frame, None]:
logger.info(f"Running Deepgram TTS for {text}")
base_url = "https://api.deepgram.com/v1/speak"
request_url = f"{base_url}?model = {
self._voice} & encoding = linear16 & container = none & sample_rate = 16000"
request_url = f"{base_url}?model={self._voice}&encoding=linear16&container=none&sample_rate=16000"
headers = {"authorization": f"token {self._api_key}"}
body = {"text": text}