From 3a0f53564955bd50798cb56a7248388a77c19060 Mon Sep 17 00:00:00 2001 From: Nazar Vinnichuk Date: Mon, 1 Sep 2025 15:49:58 +0300 Subject: [PATCH 1/4] Add Respeecher TTS to the docs --- docs.json | 1 + server/services/supported-services.mdx | 1 + server/services/tts/respeecher.mdx | 127 +++++++++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 server/services/tts/respeecher.mdx diff --git a/docs.json b/docs.json index 0e57151..dd84f62 100644 --- a/docs.json +++ b/docs.json @@ -181,6 +181,7 @@ "server/services/tts/openai", "server/services/tts/piper", "server/services/tts/playht", + "server/services/tts/respeecher", "server/services/tts/rime", "server/services/tts/sarvam", "server/services/tts/xtts" diff --git a/server/services/supported-services.mdx b/server/services/supported-services.mdx index 32b1c23..be591ce 100644 --- a/server/services/supported-services.mdx +++ b/server/services/supported-services.mdx @@ -99,6 +99,7 @@ Text-to-Speech services receive text input and output audio streams or chunks. | [OpenAI](/server/services/tts/openai) | `pip install "pipecat-ai[openai]"` | | [Piper](/server/services/tts/piper) | No dependencies required | | [PlayHT](/server/services/tts/playht) | `pip install "pipecat-ai[playht]"` | +| [Respeecher](/server/services/tts/respeecher) | `pip install "pipecat-ai[respeecher]"` | | [Rime](/server/services/tts/rime) | `pip install "pipecat-ai[rime]"` | | [Sarvam](/server/services/tts/sarvam) | No dependencies required | | [XTTS](/server/services/tts/xtts) | `pip install "pipecat-ai[xtts]"` | diff --git a/server/services/tts/respeecher.mdx b/server/services/tts/respeecher.mdx new file mode 100644 index 0000000..af199db --- /dev/null +++ b/server/services/tts/respeecher.mdx @@ -0,0 +1,127 @@ +--- +title: "Respeecher" +description: "Text-to-speech services using Respeecher Space WebSocket API" +--- + +## Overview + +Respeecher Space API provides high-quality streaming text-to-speech synthesis with low latency. + + + + Complete API documentation and method details + + + Official Respeecher Space documentation + + + Working example with interruption handling + + + +## Installation + +To use Respeecher services, install the required dependencies: + +```bash +pip install "pipecat-ai[respeecher]" +``` + +You'll also need to set up your Respeecher API key as an environment variable: `RESPEECHER_API_KEY`. + + + Get your API key by signing up at + [Respeecher Space](https://space.respeecher.com/). + + +## Frames + +### Input + +- `TextFrame` - Text content to synthesize into speech +- `TTSSpeakFrame` - Text that the TTS service should speak +- `TTSUpdateSettingsFrame` - Runtime configuration updates (e.g., voice) +- `LLMFullResponseStartFrame` / `LLMFullResponseEndFrame` - LLM response boundaries + +### Output + +- `TTSStartedFrame` - Signals start of synthesis +- `TTSAudioRawFrame` - Generated audio data chunks +- `TTSStoppedFrame` - Signals completion of synthesis +- `ErrorFrame` - Connection or processing errors + +## Language Support + +Currently only English is supported for public models. + +## Usage Example + +Initialize the WebSocket service with your API key and desired voice: + +```python +from pipecat.services.respeecher.tts import RespeecherTTSService +import os + +# Configure WebSocket service +tts = RespeecherTTSService( + api_key=os.getenv("RESPEECHER_API_KEY"), + voice_id="samantha", + params=RespeecherTTSService.InputParams( + sampling_params={ + # Optional sampling params overrides + # See https://space.respeecher.com/docs/api/tts/sampling-params-guide + # "temperature": 0.5 + }, + ), +) + +# Use in pipeline +pipeline = Pipeline([ + transport.input(), + stt, + llm, + tts, + transport.output() +]) +``` + +### Dynamic Configuration + +Make settings updates by pushing a `TTSUpdateSettingsFrame` for the `RespeecherTTSService`: + +```python +from pipecat.frames.frames import TTSUpdateSettingsFrame + +await task.queue_frame( + TTSUpdateSettingsFrame(settings={"voice": "your-new-voice-id", "sampling_params": {"temperature": 0.5}}) +) +``` + +## Metrics + +Both services provide: + +- **Time to First Byte (TTFB)** - Latency from text input to first audio +- **Processing Duration** - Total synthesis time +- **Usage Metrics** - Character count and synthesis statistics + + + [Learn how to enable Metrics](/guides/fundamentals/metrics) in your Pipeline. + + +## Additional Notes + +- **Connection Management**: WebSocket lifecycle is handled automatically with reconnection support +- **Sample Rate**: Set globally in `PipelineParams` rather than per-service for consistency From 2fa39e829130c7d64d031e3910e2a11a5d75be7d Mon Sep 17 00:00:00 2001 From: Nazar Vinnichuk Date: Mon, 1 Sep 2025 18:32:42 +0300 Subject: [PATCH 2/4] Fix some wording --- server/services/tts/respeecher.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/services/tts/respeecher.mdx b/server/services/tts/respeecher.mdx index af199db..52d5f98 100644 --- a/server/services/tts/respeecher.mdx +++ b/server/services/tts/respeecher.mdx @@ -111,7 +111,7 @@ await task.queue_frame( ## Metrics -Both services provide: +This service provides: - **Time to First Byte (TTFB)** - Latency from text input to first audio - **Processing Duration** - Total synthesis time From 83d616e96d3afd80c007e8262ded334662024a28 Mon Sep 17 00:00:00 2001 From: Nazar Vinnichuk Date: Mon, 8 Sep 2025 16:01:44 +0300 Subject: [PATCH 3/4] Adjust the docs --- server/services/tts/respeecher.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/services/tts/respeecher.mdx b/server/services/tts/respeecher.mdx index 52d5f98..5348be9 100644 --- a/server/services/tts/respeecher.mdx +++ b/server/services/tts/respeecher.mdx @@ -1,11 +1,11 @@ --- title: "Respeecher" -description: "Text-to-speech services using Respeecher Space WebSocket API" +description: "Text-to-speech service using the Respeecher Space WebSocket API" --- ## Overview -Respeecher Space API provides high-quality streaming text-to-speech synthesis with low latency. +The Respeecher Space API provides high-quality streaming text-to-speech synthesis with low latency. Official Respeecher Space documentation @@ -50,9 +50,9 @@ You'll also need to set up your Respeecher API key as an environment variable: ` ### Input -- `TextFrame` - Text content to synthesize into speech -- `TTSSpeakFrame` - Text that the TTS service should speak -- `TTSUpdateSettingsFrame` - Runtime configuration updates (e.g., voice) +- `TextFrame` - Text to synthesize into speech, subject to optional aggregation +- `TTSSpeakFrame` - Text that should be spoken immediately +- `TTSUpdateSettingsFrame` - Runtime configuration updates (e.g., voice, sampling params) - `LLMFullResponseStartFrame` / `LLMFullResponseEndFrame` - LLM response boundaries ### Output From a4098c7cbb8db6fc5c65645d3f0734770977f43f Mon Sep 17 00:00:00 2001 From: Nazar Vinnichuk Date: Fri, 12 Sep 2025 21:46:12 +0300 Subject: [PATCH 4/4] Adjust the docs --- server/services/tts/respeecher.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/services/tts/respeecher.mdx b/server/services/tts/respeecher.mdx index 5348be9..4c36def 100644 --- a/server/services/tts/respeecher.mdx +++ b/server/services/tts/respeecher.mdx @@ -64,7 +64,12 @@ You'll also need to set up your Respeecher API key as an environment variable: ` ## Language Support -Currently only English is supported for public models. +Refer to the Respeecher Space [Docs](https://space.respeecher.com/docs) +for language support in different models. + +## Supported Sample Rates + +All common sample rates are supported. ## Usage Example