Skip to main content
This endpoint allows you to upload audio samples for voice cloning. The uploaded sample will be processed and prepared for creating cloned voices using supported TTS providers.

Path Parameters

  • assistant_id (integer, required): The unique identifier of the assistant to associate the voice sample with.

Form Data

The request must be sent as multipart/form-data.
  • file (file, required): The audio file to upload. Supported formats: MP3, WAV, FLAC, M4A, OGG.
  • name (string, optional): Custom name for the voice sample. Defaults to filename if not provided.
  • description (string, optional): Description of the voice sample.
  • tags (string, optional): Comma-separated tags for organizing voice samples.

File Requirements

  • Formats: MP3, WAV, FLAC, M4A, OGG
  • Size: Maximum 50MB
  • Duration: 10 seconds to 10 minutes
  • Quality: 22kHz+ sample rate, 128kbps+ bit rate recommended
  • Content: Clear speech, single speaker, minimal background noise

Response

A successful upload returns the voice sample object with processing status.
Response
{
  "success": true,
  "voice_sample": {
    "id": 123,
    "name": "Professional Voice Sample",
    "filename": "professional_voice.wav",
    "status": "uploaded",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Example Request

cURL
curl -X POST "https://api.burki.dev/assistants/123/voice-samples/upload" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@voice_sample.wav" \
  -F "name=Professional Voice" \
  -F "description=Clear professional speaking voice" \
  -F "tags=professional,clear,business"

Error Responses

400 Bad Request - Invalid file or parameters:
{
  "detail": "File too large (max 50MB)"
}
413 Payload Too Large - File exceeds size limit:
{
  "detail": "Audio file exceeds maximum size limit"
}
422 Unprocessable Entity - Invalid audio format:
{
  "detail": "Unsupported audio format: audio/mpeg3"
}