## Basic model info - Model name: elevenlabs/elevenlabs eleven-v3 - Model description: - Endpoint name: text-to-speech ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/elevenlabs/eleven-v3/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input schema for ElevenLabs Eleven V3 text-to-speech generation.", "properties": { "apply_text_normalization": { "default": "auto", "description": "This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped.", "enum": [ "auto", "on", "off" ], "title": "Apply Text Normalization", "type": "string", "x-sr-order": 404 }, "custom_voice_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional ElevenLabs voice ID to use instead of `voice`. When set, overrides the `voice` enum selection so you can use any voice the underlying ElevenLabs account has access to (cloned, library, etc.). Discover available voice IDs via https://docs.sunra.ai/multimodal/elevenlabs-voices.md", "title": "Custom Voice Id", "x-sr-order": 302 }, "language_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Language code (ISO 639-1) used to enforce a language for the model.", "title": "Language Code", "x-sr-order": 403 }, "stability": { "default": 0.5, "description": "Voice stability (0-1)", "maximum": 1, "minimum": 0, "title": "Stability", "type": "number", "x-sr-order": 401 }, "text": { "description": "The text to convert to speech", "maxLength": 5000, "minLength": 1, "title": "Text", "type": "string", "x-sr-order": 201 }, "timestamps": { "default": false, "description": "Whether to return timestamps for each word in the generated speech", "title": "Timestamps", "type": "boolean", "x-sr-order": 402 }, "voice": { "default": "Roger", "description": "The voice to use for speech generation", "enum": [ "Roger", "Sarah", "Laura", "Charlie", "George", "Callum", "River", "Harry", "Liam", "Alice", "Matilda", "Will", "Jessica", "Eric", "Bella", "Chris", "Brian", "Daniel", "Lily", "Adam", "Bill" ], "title": "Voice", "type": "string", "x-sr-order": 301 } }, "required": [ "text" ], "title": "TextToSpeechInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "description": "Output schema for ElevenLabs Eleven V3 text-to-speech generation.", "properties": { "audio": { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" }, "input_character_count": { "title": "Input Character Count", "type": "integer" } }, "required": [ "audio", "input_character_count" ], "title": "ElevenV3Output", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "apply_text_normalization": "auto", "custom_voice_id": null, "language_code": null, "stability": 0.5, "text": "", "timestamps": false, "voice": "Roger" } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("elevenlabs/eleven-v3/text-to-speech", { input: { text: '', voice: 'Roger', custom_voice_id: null, stability: 0.5, timestamps: false, language_code: null, apply_text_normalization: 'auto' }, logs: true, onQueueUpdate: (update) => { console.log(`Status Update: ${update.status}, Request ID: ${update.request_id}`); }, }); console.log(result.data); console.log(result.requestId); ``` ### Python ```python import sunra_client result = sunra_client.subscribe( "elevenlabs/eleven-v3/text-to-speech", arguments={ "text": "", "voice": "Roger", "custom_voice_id": None, "stability": 0.5, "timestamps": False, "language_code": None, "apply_text_normalization": "auto" }, with_logs=True, on_enqueue=print, on_queue_update=print, ) print(result) ``` ### Java ```java import ai.sunra.client.*; import java.util.Map; import com.google.gson.JsonObject; var client = SunraClient.withEnvCredentials(); var response = client.subscribe( "elevenlabs/eleven-v3/text-to-speech", SubscribeOptions.builder() .input(Map.of( "text", "", "voice", "Roger", "custom_voice_id", null, "stability", 0.5, "timestamps", false, "language_code", null, "apply_text_normalization", "auto")) .resultType(JsonObject.class) .onQueueUpdate(update -> System.out.printf( "\nStatus Update: %s, Request ID: %s%n", update.getStatus(), update.getRequestId() )) .logs(true) .build() ); System.out.println("Completed!"); System.out.println(response.getData()); ``` ### Kotlin ```kotlin import ai.sunra.client.kt.* import com.google.gson.JsonObject val client = createSunraClient() val response = client.subscribe( endpointId = "elevenlabs/eleven-v3/text-to-speech", input = mapOf( "text" to "", "voice" to "Roger", "custom_voice_id" to null, "stability" to 0.5, "timestamps" to false, "language_code" to null, "apply_text_normalization" to "auto"), options = ai.sunra.client.kt.SubscribeOptions(logs = true), onUpdate = { update -> println("\nStatus Update: ${update.status}, Request ID: ${update.requestId}") } ) println("Completed!") println(response.data) ``` ### Curl ```bash curl --request POST \ --url https://api.sunra.ai/v1/queue/elevenlabs/eleven-v3/text-to-speech \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"text":"","voice":"Roger","custom_voice_id":null,"stability":0.5,"timestamps":false,"language_code":null,"apply_text_normalization":"auto"}' ``` ## Model readme >