Overview
The voice module provides real-time voice transcription via AssemblyAI streaming API. Users can speak into their microphone and get live text transcription in the chat interface.Exports
thepopebot/voice
React hook for voice input:
useVoiceInput()
Custom React hook that provides voice transcription state and controls.
Returns:
isRecording(boolean) - Whether recording is activetranscript(string) - Current transcription textstartRecording()- Start voice capturestopRecording()- Stop voice captureerror(string | null) - Error message if transcription fails
thepopebot/voice/actions
Server actions for voice token management:
getVoiceToken()
Server action that generates a temporary AssemblyAI streaming token.
Returns:
{ token: string }on success{ error: string }if voice transcription is not configured or token fetch fails
Requires
ASSEMBLYAI_API_KEY environment variable. Token is valid for 60 seconds and is only needed at WebSocket handshake time.Setup
Enable voice input by setting the AssemblyAI API key:Usage Example
Related
- Web Interface - Built-in voice input in chat
- Environment Variables - Configure AssemblyAI