VoiceFlow provides a simplified service for transcription and speech synthesis only. The API supports two core functions:
- Voice-to-Text (V2T): Transcribe audio files to text
- Text-to-Voice (T2V): Convert text to synthesized speech
http://localhost:8000
Convert an audio file to text transcription.
Endpoint: POST /v1/transcribe
Request:
- Content-Type:
multipart/form-data - Body:
audio_file: Audio file (WAV, MP3, etc.)
Response:
{
"task_id": "uuid-string",
"status": "PENDING"
}Example:
curl -X POST http://localhost:8000/v1/transcribe \
-F "audio_file=@sample.wav"Convert text to synthesized speech audio.
Endpoint: POST /v1/synthesize
Request:
- Content-Type:
application/x-www-form-urlencoded - Body:
text: Text to convert to speech
Response:
{
"task_id": "uuid-string",
"status": "PENDING"
}Example:
curl -X POST http://localhost:8000/v1/synthesize \
-F "text=Hello, this is a test message"Poll for the result of a transcription or synthesis task.
Endpoint: GET /v1/tasks/{task_id}
Response for V2T (Transcription):
{
"task_id": "uuid-string",
"status": "SUCCESS",
"transcribed_text": "This is the transcribed text from the audio file",
"audio_url": null,
"error_message": null
}Response for T2V (Synthesis):
{
"task_id": "uuid-string",
"status": "SUCCESS",
"transcribed_text": null,
"audio_url": "https://presigned-url-to-audio-file",
"error_message": null
}Response for Pending Tasks:
{
"task_id": "uuid-string",
"status": "PENDING",
"transcribed_text": null,
"audio_url": null,
"error_message": null
}Response for Failed Tasks:
{
"task_id": "uuid-string",
"status": "FAILED",
"transcribed_text": null,
"audio_url": null,
"error_message": "Error description"
}Example:
curl -X GET http://localhost:8000/v1/tasks/your-task-id-hereTasks can have one of three statuses:
PENDING: Task is being processedSUCCESS: Task completed successfullyFAILED: Task failed (checkerror_messagefor details)
- Submit audio file β
POST /v1/transcribe - Receive task ID β
{"task_id": "abc-123", "status": "PENDING"} - Poll for result β
GET /v1/tasks/abc-123 - Get transcription β
{"status": "SUCCESS", "transcribed_text": "..."}
- Submit text β
POST /v1/synthesize - Receive task ID β
{"task_id": "def-456", "status": "PENDING"} - Poll for result β
GET /v1/tasks/def-456 - Get audio URL β
{"status": "SUCCESS", "audio_url": "https://..."} - Download audio β Use the presigned URL to download the audio file
A simple web interface is available at:
http://localhost:7860
The demo UI provides:
- File upload for audio transcription
- Text input for speech synthesis
- Real-time status updates
- Audio playback for synthesis results
The simplified architecture removes the LLM service and conversation management:
- API Gateway: Handles requests and provides simplified endpoints
- Orchestrator: Directly coordinates STT and TTS services (no LLM)
- STT Service: Transcribes audio using Whisper model via Triton
- TTS Service: Synthesizes speech using TTS model via Triton
- Storage: MinIO for temporary audio file storage
- Queue: Redis for task management
Common error scenarios:
- Missing audio file: 400 Bad Request
- Empty text: 400 Bad Request
- File upload failure: 500 Internal Server Error
- Service unavailable: 500 Internal Server Error
- Task timeout: Task status remains PENDING (retry recommended)
No explicit rate limiting is currently implemented. Consider implementing rate limiting for production use.
- Audio URLs are presigned and expire after 15 minutes
- Temporary files are automatically cleaned up after processing
- No authentication is currently required (add for production)