## Basic model info - Model name: bytedance/bytedance seed-audio-1.0 - Model description: Seed Audio 1.0 by ByteDance. Generate high-quality, natural sounding audio from text, with preset voices, reference-audio voice cloning, or an image reference. - Endpoint name: text-to-audio ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/bytedance/seed-audio-1.0/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input model for text-to-audio generation using Seed Audio 1.0.", "properties": { "prompt": { "description": "Prompt or text to synthesize. Reference audio inputs by order with @Audio1, @Audio2, @Audio3.", "maxLength": 2048, "minLength": 1, "title": "Prompt", "type": "string", "x-sr-order": 201 }, "image_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" }, { "type": "null" } ], "description": "A single reference image URL (jpeg/png/webp, up to 10MB). Cannot be combined with audio references.", "title": "Image Url", "x-sr-order": 302 }, "audio_urls": { "anyOf": [ { "items": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ] }, "maxItems": 3, "type": "array" }, { "type": "null" } ], "description": "Up to 3 reference audio URLs, referenced in prompt as @Audio1, @Audio2, @Audio3. Each clip: up to 30s, 10MB, wav/mp3/pcm/ogg_opus.", "title": "Audio Urls", "x-sr-order": 301 }, "output_format": { "default": "mp3", "description": "Output audio format.", "enum": [ "wav", "mp3", "pcm", "ogg_opus" ], "title": "Output Format", "type": "string", "x-sr-order": 402 }, "pitch": { "default": 0, "description": "Voice pitch shift in semitones. 0 is normal pitch, -12 lowers by one octave, 12 raises by one octave.", "maximum": 12, "minimum": -12, "title": "Pitch", "type": "integer", "x-sr-order": 406 }, "sample_rate": { "default": 24000, "description": "Sample rate of the output audio in Hz.", "enum": [ 8000, 16000, 24000, 32000, 44100, 48000 ], "title": "Sample Rate", "type": "integer", "x-sr-order": 403 }, "speed": { "default": 1, "description": "Speech speed. 1.0 is normal speed, 0.5 is half speed, 2.0 is double speed.", "maximum": 2, "minimum": 0.5, "title": "Speed", "type": "number", "x-sr-order": 404 }, "voice": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Voice to use for synthesis: either a preset voice name (e.g. vivi_mixed_en_zh_ja_es_id, kian_en_zh, sophie_en_zh, felix_zh, monkey_king_zh) or a cloned voice id.", "title": "Voice", "x-sr-order": 401 }, "volume": { "default": 1, "description": "Volume. 1.0 is normal volume, 0.5 is half, 2.0 is double.", "maximum": 2, "minimum": 0.5, "title": "Volume", "type": "number", "x-sr-order": 405 } }, "required": [ "prompt" ], "title": "TextToAudioInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "description": "Output model with audio duration for post_calculated pricing.", "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" }, "output_audio_dur": { "description": "Duration of the output audio in seconds (rounded up)", "title": "Output Audio Dur", "type": "integer" } }, "required": [ "audio", "output_audio_dur" ], "title": "SeedAudioOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "prompt": "", "image_url": null, "audio_urls": null, "output_format": "mp3", "pitch": 0, "sample_rate": 24000, "speed": 1, "voice": null, "volume": 1 } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("bytedance/seed-audio-1.0/text-to-audio", { input: { prompt: '', audio_urls: null, image_url: null, voice: null, output_format: 'mp3', sample_rate: 24000, speed: 1, volume: 1, pitch: 0 }, 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( "bytedance/seed-audio-1.0/text-to-audio", arguments={ "prompt": "", "audio_urls": None, "image_url": None, "voice": None, "output_format": "mp3", "sample_rate": 24000, "speed": 1, "volume": 1, "pitch": 0 }, 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( "bytedance/seed-audio-1.0/text-to-audio", SubscribeOptions.builder() .input(Map.of( "prompt", "", "audio_urls", null, "image_url", null, "voice", null, "output_format", "mp3", "sample_rate", 24000, "speed", 1, "volume", 1, "pitch", 0)) .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 = "bytedance/seed-audio-1.0/text-to-audio", input = mapOf( "prompt" to "", "audio_urls" to null, "image_url" to null, "voice" to null, "output_format" to "mp3", "sample_rate" to 24000, "speed" to 1, "volume" to 1, "pitch" to 0), 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/bytedance/seed-audio-1.0/text-to-audio \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"prompt":"","audio_urls":null,"image_url":null,"voice":null,"output_format":"mp3","sample_rate":24000,"speed":1,"volume":1,"pitch":0}' ``` ## Model readme >