Skip to content

Commit

Permalink
Merge pull request pipecat-ai#1044 from pipecat-ai/mb/elevenlabs-http…
Browse files Browse the repository at this point in the history
…-fix-voice-settings

Fixed a type error when using voice_settings in ElevenLabsHttpTTSService
  • Loading branch information
markbackman authored Jan 20, 2025
2 parents e4f83b2 + 262d3a1 commit e3d53d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/pipecat/services/elevenlabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,13 +524,13 @@ async def run_tts(self, text: str) -> AsyncGenerator[Frame, None]:

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"]
Expand Down

0 comments on commit e3d53d3

Please sign in to comment.