Authenticated API
Voice AI endpoints require a valid JWT Bearer token with staff roles. Accessible via the API gateway at /v1/voice-ai/* and /v1/speech/*.
Streaming & Configuration
Real-time audio streaming, voice system configuration, and analytics.
Streaming Audio
For real-time audio streaming:
WebSocket Connection
const ws = new WebSocket('wss://voice.olympuscloud.ai/stream');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'start_session',
location_id: 'loc-xyz789',
channel: 'drive_thru',
access_token: 'your-token'
}));
};
// Send audio chunks
ws.send(audioChunk); // Binary audio data
// Receive responses
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
if (data.type === 'partial_transcript') {
console.log('Hearing:', data.text);
} else if (data.type === 'final_response') {
playAudio(data.audio_url);
}
};
Voice Configuration
Get Configuration
GET /api/v1/voice/config?location_id=loc-xyz789
Authorization: Bearer {access_token}
Response
{
"location_id": "loc-xyz789",
"tts": {
"voice": "en-US-Neural2-F",
"speed": 1.0,
"pitch": 0
},
"stt": {
"model": "enhanced",
"language": "en-US",
"profanity_filter": true
},
"greeting": "Welcome to Acme Burgers! What can I get for you today?",
"closing": "Thank you for choosing Acme Burgers!",
"upsell_enabled": true,
"upsell_items": ["drinks", "fries", "desserts"],
"timeout_seconds": 30,
"max_session_minutes": 10
}
Update Configuration
PUT /api/v1/voice/config
Authorization: Bearer {access_token}
Content-Type: application/json
{
"location_id": "loc-xyz789",
"tts": {
"voice": "en-US-Neural2-D",
"speed": 1.1
},
"greeting": "Hi there! Welcome to Acme Burgers. What sounds good today?",
"upsell_enabled": false
}
Analytics
Get Voice Analytics
GET /api/v1/voice/analytics?
location_id=loc-xyz789&
start_date=2026-01-01&
end_date=2026-01-18
Authorization: Bearer {access_token}
Response
{
"period": {
"start": "2026-01-01",
"end": "2026-01-18"
},
"summary": {
"total_sessions": 2450,
"completed_orders": 2180,
"completion_rate": 89.0,
"avg_session_duration_seconds": 125,
"avg_order_value": 18.50
},
"accuracy": {
"speech_recognition": null,
"intent_classification": null,
"entity_extraction": null
},
"common_issues": [
{
"type": "item_not_found",
"count": 145,
"examples": ["supreme burrito", "diet sprite"]
},
{
"type": "clarification_needed",
"count": 320,
"avg_clarifications_per_session": 1.2
}
]
}
Related Pages
- Voice Sessions - Session lifecycle management
- NLU & Intent (Hey Maximus) - Intent types and language processing
- Drive-Thru - Drive-thru lane management
- Offline Queue - Offline command queuing