Voice Bot Enterprise SDK
The Voice Bot SDK enables you to integrate vocal and conversational audio capabilities into your software platform. With the Voice Bot, you can capture client audio recordings, transcribe spoken messages, query your knowledge bases, and return synthetic voice answers dynamically.
Technical Overview
The voice bot pipeline integrates automatic speech recognition (ASR) to transcribe client voice prompts into text, routes the queries to LLMs or vector databases, and converts the generated response back to audio via text-to-speech (TTS) engines.
Key Endpoints
For hosted SDK configurations, the Voice Bot is controlled through the following REST API endpoints:
1. Start Voice Bot Session (POST /voicebotstart)
Starts a new voice agent session, establishing connection parameters and parsing user audio records.
-
Request Payload:
prompt: String. Natural language query or transcribed text context.modeljsonStructure: String. Format structure configuration for voice responses.
-
Response:
transcribed_text: The transcribed input.Summary: Context summary of the request.Session_Details: Detailed trace mapping and event stats.
2. Continued Voice Interaction (POST /voicebotChatApi)
Sends a voice prompt within an ongoing session.
-
Request Payload:
prompt: String query.uuId: Session ID._id: Document ID.userMessage: Raw audio or transcription message.
-
Response:
answer: Text output.
Code Example: Integrating Voice SDK
Below is a Python example of starting a voice agent session and processing a query:
import requests
API_URL = "http://localhost:5001/api"
# Start a session
response = requests.post(f"{API_URL}/voicebotstart", json={
"prompt": "How can I check my leave balance?",
"modeljsonStructure": "short_answer"
})
data = response.json()
print("Transcribed Text:", data["combinedResponse"]["transcribed_text"])
print("Summary:", data["combinedResponse"]["Summary"])Supported Audios & Media Formats
AI-Horizon natively parses the following audio containers:
- WAV: Uncompressed audio (recommended for high accuracy).
- MP3: Standard compressed audio format.
- M4A / MP4: Standard mobile and Apple voice recordings.