## Basic model info - Model name: qwen/qwen qwen-audio-3.0-tts-flash - Model description: Qwen-Audio-3.0-TTS Flash is a low-latency text-to-speech model with 12 system voices in Mandarin Chinese and English, natural-language delivery control, and inline emotion tags. - Endpoint name: text-to-speech ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/qwen/qwen-audio-3.0-tts-flash/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input schema for Qwen-Audio-3.0-TTS Flash speech synthesis.", "properties": { "seed": { "anyOf": [ { "maximum": 65535, "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Seed for reproducible synthesis. The same seed and input yield the same audio.", "title": "Seed", "x-sr-order": 406 }, "audio_format": { "default": "mp3", "description": "Container of the generated audio file.", "enum": [ "mp3", "wav" ], "title": "Audio Format", "type": "string", "x-sr-order": 401 }, "instruction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Natural-language direction for how the text should be performed, e.g. 'Speak slowly and warmly, like telling a bedtime story.' Any phrasing is accepted.", "title": "Instruction", "x-sr-order": 302 }, "pitch": { "default": 1, "description": "Pitch multiplier. Below 1.0 lowers the voice, above 1.0 raises it.", "maximum": 2, "minimum": 0.5, "title": "Pitch", "type": "number", "x-sr-order": 404 }, "sample_rate": { "default": 24000, "description": "Sample rate of the generated audio, in Hz.", "enum": [ 8000, 16000, 22050, 24000, 44100, 48000 ], "title": "Sample Rate", "type": "integer", "x-sr-order": 402 }, "speed": { "default": 1, "description": "Speech rate. Below 1.0 slows the delivery down, above 1.0 speeds it up.", "maximum": 2, "minimum": 0.5, "title": "Speed", "type": "number", "x-sr-order": 403 }, "text": { "description": "The text to convert to speech. Inline tags steer delivery: control tags such as [excited] or [serious] set the emotion for everything that follows, and rich language tags such as [laughing], [sighing] or [clears throat] insert a vocal effect at that position.", "maxLength": 20000, "minLength": 1, "title": "Text", "type": "string", "x-sr-order": 201 }, "voice": { "default": "longanfengyue", "description": "The voice to synthesize with. Every voice speaks Mandarin Chinese and English except loongmary, loongeva_v3.6 and loongjohn, which are English-only.", "enum": [ "longanfengyue", "longanyuanfei", "longanlingxi", "longanxiaoxin", "longanhuan_v3.6", "longjielidou_v3.6", "longpaopao_v3.6", "longhuohuo_v3.6", "longchuanshu_v3.6", "loongmary", "loongeva_v3.6", "loongjohn" ], "title": "Voice", "type": "string", "x-sr-order": 301 }, "volume": { "default": 50, "description": "Output loudness.", "maximum": 100, "minimum": 0, "title": "Volume", "type": "integer", "x-sr-order": 405 } }, "required": [ "text" ], "title": "TextToSpeechInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "description": "Output schema for Qwen-Audio-3.0-TTS speech synthesis.", "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": { "description": "Number of characters in the input text, as billed by the provider.", "title": "Input Character Count", "type": "integer" } }, "required": [ "audio", "input_character_count" ], "title": "QwenAudioTTSOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "seed": null, "audio_format": "mp3", "instruction": null, "pitch": 1, "sample_rate": 24000, "speed": 1, "text": "", "voice": "longanfengyue", "volume": 50 } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("qwen/qwen-audio-3.0-tts-flash/text-to-speech", { input: { text: '', voice: 'longanfengyue', instruction: null, audio_format: 'mp3', sample_rate: 24000, speed: 1, pitch: 1, volume: 50, seed: null }, 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( "qwen/qwen-audio-3.0-tts-flash/text-to-speech", arguments={ "text": "", "voice": "longanfengyue", "instruction": None, "audio_format": "mp3", "sample_rate": 24000, "speed": 1, "pitch": 1, "volume": 50, "seed": None }, 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( "qwen/qwen-audio-3.0-tts-flash/text-to-speech", SubscribeOptions.builder() .input(Map.of( "text", "", "voice", "longanfengyue", "instruction", null, "audio_format", "mp3", "sample_rate", 24000, "speed", 1, "pitch", 1, "volume", 50, "seed", null)) .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 = "qwen/qwen-audio-3.0-tts-flash/text-to-speech", input = mapOf( "text" to "", "voice" to "longanfengyue", "instruction" to null, "audio_format" to "mp3", "sample_rate" to 24000, "speed" to 1, "pitch" to 1, "volume" to 50, "seed" to null), 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/qwen/qwen-audio-3.0-tts-flash/text-to-speech \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"text":"","voice":"longanfengyue","instruction":null,"audio_format":"mp3","sample_rate":24000,"speed":1,"pitch":1,"volume":50,"seed":null}' ``` ## Model readme >