Skip to main content

speech

Method
This is a method of the AudioAgent class in the audio_agent module.
Convert text to speech.

Signature

Parameters

str
required
Text to convert to speech
Optional[str]
Path to save audio file (optional)
Optional[str]
Voice to use (e.g., “alloy”, “echo”, “fable”)
Optional[float]
Speech speed (0.25 to 4.0)
Optional[str]
Audio format (mp3, opus, aac, flac, wav)
Optional[str]
Override model for this call **kwargs: Additional provider-specific parameters

Returns

Any
Audio response object with stream_to_file() method

Usage

Uses

  • speech
  • response.stream_to_file
  • Path

Used By

Source

View on GitHub

praisonaiagents/agent/audio_agent.py at line 212