diff --git a/CHANGELOG.md b/CHANGELOG.md index 66365bef8..e18113c0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 a type error when using `voice_settings` in `ElevenLabsHttpTTSService`. + ## [0.0.53] - 2025-01-18 ### Added diff --git a/src/pipecat/services/elevenlabs.py b/src/pipecat/services/elevenlabs.py index d80a7e9c4..2677accaa 100644 --- a/src/pipecat/services/elevenlabs.py +++ b/src/pipecat/services/elevenlabs.py @@ -524,13 +524,13 @@ class ElevenLabsHttpTTSService(TTSService): url = f"{self._base_url}/v1/text-to-speech/{self._voice_id}/stream" - payload = { + payload: Dict[str, Union[str, Dict[str, Union[float, bool]]]] = { "text": text, "model_id": self._model_name, } if self._voice_settings: - payload["voice_settings"] = json.dumps(self._voice_settings) + payload["voice_settings"] = self._voice_settings if self._settings["language"]: payload["language_code"] = self._settings["language"]