Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Voice
Voice provides text-to-speech (TTS) and speech-to-text (STT) capabilities.
Available Providers
| Provider | Description |
|---|
OpenAIVoiceProvider | OpenAI TTS and Whisper |
ElevenLabsVoiceProvider | ElevenLabs voice synthesis |
Quick Start
import { createOpenAIVoice, createElevenLabsVoice } from 'praisonai';
// OpenAI voice
const openaiVoice = createOpenAIVoice({
apiKey: process.env.OPENAI_API_KEY
});
// ElevenLabs voice
const elevenLabsVoice = createElevenLabsVoice({
apiKey: process.env.ELEVENLABS_API_KEY
});
Text-to-Speech
const audio = await voice.speak({
text: 'Hello world',
voice: 'alloy' // OpenAI voices: alloy, echo, fable, onyx, nova, shimmer
});
Speech-to-Text
const text = await voice.listen({
audio: audioBuffer
});
CLI Usage
praisonai-ts voice info
praisonai-ts voice providers --json