Skip to content

Commit

Permalink
doc(openai): Added hint re the 24kHz sample rate
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTom101 committed Jun 1, 2024
1 parent 8683cae commit 7085b1e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/pipecat/services/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
*,
Expand Down

0 comments on commit 7085b1e

Please sign in to comment.