Skip to main content

Overview

ElevenLabs is a specialized audio provider for text-to-speech and speech-to-text operations. Vikat performs conversions including:
  • Model ID mapping - Uses provider model identifier directly
  • Voice configuration - Maps voice settings (stability, similarity, boost, speed, style)
  • Response format conversion - Speech format handling (MP3, Opus, PCM/WAV)
  • Timestamp support - Character-level timing alignment for TTS
  • Transcription with alignment - Word and character-level timing, diarization, and additional formats
  • Pronunciation dictionaries - Support for custom pronunciation rules
  • Voice quality parameters - Stability, similarity boost, and speaker boost controls

Supported Operations

Unsupported Operations (❌): Chat Completions, Responses API, Text Completions, and Embeddings are not supported by ElevenLabs (audio-focused provider). These return UnsupportedOperationError.Note: ElevenLabs also supports a β€œSpeech with Timestamps” endpoint at /v1/text-to-speech/{voice_id}/with-timestamps (non-streaming only) for enhanced timestamp information.

Setup & Configuration

Configure ElevenLabs as a provider.
ElevenLabs provider dashboard
  1. Navigate to Models > Model Providers. Look for ElevenLabs under Configured Providers. If it is missing, click on Add New Provider and select ElevenLabs.
  2. Click Add Key or edit an existing key.
  3. Set a name for your key.
  4. Paste your API key directly or use an environment variable (for example, env.ELEVENLABS_API_KEY).
  5. Set Allowed Models to All Models (default) or the specific model allowlist you want this key to serve.
  6. Save the provider configuration.
For text-to-speech calls, the Vikat model is the ElevenLabs voice ID unless you pass a provider-specific voice override in the request.

1. Speech (Text-to-Speech)

Request Parameters

Core Parameters

Voice Configuration

Voice settings are optional and controlled via params:

Advanced Parameters

Use extra_params for ElevenLabs-specific TTS features:

Advanced TTS Parameters

Response Format

Defaults to MP3 format if not specified. Format is passed via query parameter output_format.

Timestamps Support

To get character-level timing alignment, enable with_timestamps:
When enabled, the endpoint /v1/text-to-speech/{voice_id}/with-timestamps is used and the response includes:
  • audio_base64 - Audio data as base64-encoded string
  • alignment.char_start_times_ms - Character start times in milliseconds
  • alignment.char_end_times_ms - Character end times in milliseconds
  • alignment.characters - Array of characters
  • normalized_alignment - Same as alignment but for normalized text

Response Conversion

Non-Timestamp Response

Timestamp Response

Streaming

Streaming speech returns audio in chunks as they are generated:
Final chunk:

2. Transcription (Speech-to-Text)

Request Parameters

Input Source

Choose one of the following (mutually exclusive): Error: Providing both or neither will result in error.

Core Parameters

Advanced Parameters

Use extra_params for transcription-specific features:

Transcription Options

Additional Formats

Request multiple output formats simultaneously:
Supported formats: segmented_json, docx, pdf, txt, html, srt

Response Conversion

Basic Transcription

With Diarization

When diarize: true, the response includes speaker identification:

With Timestamps

Character-level timing when timestamps_granularity: "character":

With Additional Formats


Caveats

Severity: High Behavior: Voice ID must be provided for TTS requests Impact: Request fails without voice configuration Code: elevenlabs.go:198-208
Severity: High Behavior: Either file or cloud_storage_url must be provided (not both) Impact: Request fails with ambiguous input Code: elevenlabs.go:471-478
Severity: Low Behavior: Response formats (MP3, Opus, WAV) mapped via format string Impact: Format parameter passed as query string to endpoint Code: elevenlabs.go:712-715, utils.go:5-35
Severity: Low Behavior: Timestamp requests use /with-timestamps endpoint variant Impact: Switches endpoint based on with_timestamps flag Code: elevenlabs.go:195-205
Severity: Low Behavior: Transcription uses multipart/form-data, not JSON Impact: File and parameters sent as form fields Code: elevenlabs.go:480-690

3. List Models

Request Parameters

Returns available models with their capabilities and language support.

Response Conversion