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

@@ -5,6 +5,12 @@ All notable changes to **pipecat** will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Fixed an issue with Deepgram TTS that was introduced in the previous release.
## [0.0.25] - 2024-05-31
### Added

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}