This commit is contained in:
Kwindla Hultman Kramer
2024-05-29 23:41:35 -07:00
parent 920745345a
commit d5f106ae19
3 changed files with 4 additions and 5 deletions

View File

@@ -5,7 +5,6 @@
#
import aiohttp
import json
from typing import AsyncGenerator
@@ -33,8 +32,8 @@ 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}