Skip to main content
For voice-note transcription in gateway bots (Telegram/Slack/WhatsApp), see Voice Notes — the bot layer already wires stt_tool for you.
Enable your agents to speak and listen with TTS and STT tools.
The user sends voice or asks for spoken output; the agent transcribes input and synthesises replies with STT/TTS tools.

Quick Start

1

Bot CLI

2

Python


TTS Tool

Convert text to speech and get an audio file.

Usage

Options


STT Tool

Transcribe audio files to text.

Usage

Options


Bot CLI Options

Enable audio tools when starting bots:

Examples


Supported Providers

Audio tools use the core AudioAgent which supports multiple providers via LiteLLM:

Voice Options

Available voices for OpenAI TTS:

Architecture

Audio tools are in the wrapper layer (praisonai), not the core SDK. They wrap the core AudioAgent for easy use with agents and bots.

Best Practices

Give an agent text_to_speech when it must speak and speech_to_text when it must listen — not both by reflex. Fewer tools keep the model focused and cut the chance it synthesises audio when plain text would do.
--auto-tts converts every bot reply to speech, which adds cost and latency to short acknowledgements. Prefer --tts and let the model decide when audio adds value, reserving auto-conversion for voice-first channels.
When users send voice notes, run speech_to_text first so the model reasons over text. This keeps prompts small and lets you log and moderate the transcript like any other message.
The tools wrap AudioAgent, which calls external TTS/STT providers. Store provider keys as environment variables so voice features work the same across local runs, bots, and CI without editing tool code.

Bot CLI

Full bot CLI reference

AudioAgent

Core AudioAgent class

Voice Notes

Automatic transcription of inbound voice messages in gateway bots