## Basic model info - Model name: elevenlabs/elevenlabs multilingual-v2 - Model description: API for ElevenLabs Multilingual V2 text-to-speech generation - Endpoint name: text-to-speech ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/elevenlabs/multilingual-v2/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input schema for ElevenLabs Multilingual V2 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": 409 }, "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. An error will be returned if language code is not supported by the model.", "title": "Language Code", "x-sr-order": 408 }, "next_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", "title": "Next Text", "x-sr-order": 407 }, "previous_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation.", "title": "Previous Text", "x-sr-order": 406 }, "similarity_boost": { "default": 0.75, "description": "Similarity boost (0-1)", "maximum": 1, "minimum": 0, "title": "Similarity Boost", "type": "number", "x-sr-order": 402 }, "speed": { "default": 1, "description": "Speech speed (0.7-1.2). Values below 1.0 slow down the speech, above 1.0 speed it up. Extreme values may affect quality.", "maximum": 1.2, "minimum": 0.7, "title": "Speed", "type": "number", "x-sr-order": 404 }, "stability": { "default": 0.5, "description": "Voice stability (0-1)", "maximum": 1, "minimum": 0, "title": "Stability", "type": "number", "x-sr-order": 401 }, "style": { "default": 0, "description": "Style exaggeration (0-1)", "maximum": 1, "minimum": 0, "title": "Style", "type": "number", "x-sr-order": 403 }, "text": { "description": "The text to convert to speech", "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": 405 }, "voice": { "default": "Aria", "description": "The voice to use for speech generation", "enum": [ "Aria", "Roger", "Sarah", "Laura", "Charlie", "George", "Callum", "River", "Liam", "Charlotte", "Alice", "Matilda", "Will", "Jessica", "Eric", "Chris", "Brian", "Daniel", "Lily", "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 Multilingual V2 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": "MultilingualV2Output", "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, "next_text": null, "previous_text": null, "similarity_boost": 0.75, "speed": 1, "stability": 0.5, "style": 0, "text": "", "timestamps": false, "voice": "Aria" } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("elevenlabs/multilingual-v2/text-to-speech", { input: { text: '', voice: 'Aria', custom_voice_id: null, stability: 0.5, similarity_boost: 0.75, style: 0, speed: 1, timestamps: false, previous_text: null, next_text: null, 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/multilingual-v2/text-to-speech", arguments={ "text": "", "voice": "Aria", "custom_voice_id": None, "stability": 0.5, "similarity_boost": 0.75, "style": 0, "speed": 1, "timestamps": False, "previous_text": None, "next_text": None, "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/multilingual-v2/text-to-speech", SubscribeOptions.builder() .input(Map.of( "text", "", "voice", "Aria", "custom_voice_id", null, "stability", 0.5, "similarity_boost", 0.75, "style", 0, "speed", 1, "timestamps", false, "previous_text", null, "next_text", null, "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/multilingual-v2/text-to-speech", input = mapOf( "text" to "", "voice" to "Aria", "custom_voice_id" to null, "stability" to 0.5, "similarity_boost" to 0.75, "style" to 0, "speed" to 1, "timestamps" to false, "previous_text" to null, "next_text" to null, "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/multilingual-v2/text-to-speech \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"text":"","voice":"Aria","custom_voice_id":null,"stability":0.5,"similarity_boost":0.75,"style":0,"speed":1,"timestamps":false,"previous_text":null,"next_text":null,"language_code":null,"apply_text_normalization":"auto"}' ``` ## Model readme undefined