diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3b82dde..af91cb43d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed an issue in `LiveKitTransport` where empty `AudioRawFrame`s were pushed down the pipeline. This resulted in warnings by the STT processor. +- Fixed `PiperTTSService` to send text as a JSON object in the request body, + resolving compatibility with Piper's HTTP API. - Fixed an issue with the `TavusVideoService` where an error was thrown due to missing transcription callbacks. diff --git a/src/pipecat/services/piper/tts.py b/src/pipecat/services/piper/tts.py index 7892e15fa..d5b663c77 100644 --- a/src/pipecat/services/piper/tts.py +++ b/src/pipecat/services/piper/tts.py @@ -84,7 +84,9 @@ class PiperTTSService(TTSService): try: await self.start_ttfb_metrics() - async with self._session.post(self._base_url, json=text, headers=headers) as response: + async with self._session.post( + self._base_url, json={"text": text}, headers=headers + ) as response: if response.status != 200: error = await response.text() logger.error(