Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Voice input and output for agents
Create Voice-Enabled Agent
use praisonai::{AudioAgent, AudioConfig}; // Configure audio settings let config = AudioConfig::new() .speech_to_text(true) .text_to_speech(true) .voice("alloy"); // Create AudioAgent (specialized agent with audio capabilities) let audio_agent = AudioAgent::new() .name("Voice Assistant") .instructions("You are a helpful voice assistant") .config(config) .build()?; // Process audio input let response = audio_agent.process_audio("path/to/audio.wav").await?;
Text-to-Speech Output
use praisonai::{AudioAgent, AudioConfig}; let config = AudioConfig::new() .text_to_speech(true) .voice("nova"); // Choose voice let agent = AudioAgent::new() .name("Speaker") .config(config) .build()?; // Generate speech from text let audio_bytes = agent.speak("Hello, how can I help?").await?;
speech_to_text
bool
false
text_to_speech
voice
String
alloy
nova
echo
onyx