From 7085b1ea3f24bfd8ce2304e414d2f882fd08da98 Mon Sep 17 00:00:00 2001 From: TomTom101 Date: Sat, 1 Jun 2024 20:35:46 +0200 Subject: [PATCH] doc(openai): Added hint re the 24kHz sample rate --- src/pipecat/services/openai.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pipecat/services/openai.py b/src/pipecat/services/openai.py index ae0cd70c1..44bc9d847 100644 --- a/src/pipecat/services/openai.py +++ b/src/pipecat/services/openai.py @@ -264,6 +264,16 @@ async def run_image_gen(self, prompt: str) -> AsyncGenerator[Frame, None]: class OpenAITTSService(TTSService): + """This service uses the OpenAI TTS API to generate audio from text. + The returned audio is PCM encoded at 24kHz. When using the DailyTransport, set the sample rate in the DailyParams: + ``` + DailyParams( + audio_out_enabled=True, + audio_out_sample_rate=24_000, + ) + ``` + """ + def __init__( self, *,