## Basic model info - Model name: elevenlabs/elevenlabs sound-effects - Model description: API for ElevenLabs Sound Effects text-to-sound-effects generation - Endpoint name: text-to-sound-effects ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/elevenlabs/sound-effects/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input schema for ElevenLabs Sound Effects text-to-sound-effects generation.", "properties": { "duration": { "description": "Duration in seconds (0.5-22). Default: None (auto-detect).", "maximum": 22, "minimum": 0.5, "multipleOf": 0.1, "title": "Duration", "type": "number", "x-sr-order": 401 }, "output_format": { "default": "mp3_44100_128", "description": "Output format from output_format_list", "enum": [ "mp3_22050_32", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", "mp3_44100_128", "mp3_44100_192", "pcm_8000", "pcm_16000", "pcm_22050", "pcm_24000", "pcm_44100", "pcm_48000", "ulaw_8000", "alaw_8000", "opus_48000_32", "opus_48000_64", "opus_48000_96", "opus_48000_128", "opus_48000_192" ], "title": "Output Format", "type": "string", "x-sr-order": 400 }, "prompt_influence": { "default": 0.3, "description": "Influence of prompt (0-1). Default: 0.3.", "maximum": 1, "minimum": 0, "multipleOf": 0.01, "title": "Prompt Influence", "type": "number", "x-sr-order": 402 }, "text": { "description": "The text that will get converted into a sound effect.", "maxLength": 450, "title": "Text", "type": "string", "x-sr-order": 201 } }, "required": [ "text" ], "title": "TextToSoundEffectsInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "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" } }, "required": [ "audio" ], "title": "SoundEffectsOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "duration": 0.5, "output_format": "mp3_44100_128", "prompt_influence": 0.3, "text": "" } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("elevenlabs/sound-effects/text-to-sound-effects", { input: { text: '', output_format: 'mp3_44100_128', duration: 0.5, prompt_influence: 0.3 }, 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/sound-effects/text-to-sound-effects", arguments={ "text": "", "output_format": "mp3_44100_128", "duration": 0.5, "prompt_influence": 0.3 }, 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/sound-effects/text-to-sound-effects", SubscribeOptions.builder() .input(Map.of( "text", "", "output_format", "mp3_44100_128", "duration", 0.5, "prompt_influence", 0.3)) .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/sound-effects/text-to-sound-effects", input = mapOf( "text" to "", "output_format" to "mp3_44100_128", "duration" to 0.5, "prompt_influence" to 0.3), 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/sound-effects/text-to-sound-effects \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"text":"","output_format":"mp3_44100_128","duration":0.5,"prompt_influence":0.3}' ``` ## Model readme undefined