## Basic model info - Model name: bytedance/bytedance seed-asr-2.0 - Model description: Doubao Seed ASR 2.0 - large-model audio file transcription by ByteDance. Supports Chinese (incl. major dialects), English and 25 languages, with punctuation, inverse text normalization, speaker diarization and sentence-level timestamps. - Endpoint name: speech-to-text ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/bytedance/seed-asr-2.0/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input schema for Doubao Seed ASR 2.0 audio file transcription.", "properties": { "audio": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ], "description": "Audio file URL. Supported formats: mp3, wav, ogg, raw (pcm).", "title": "Audio", "x-sr-order": 301 }, "enable_ddc": { "default": false, "description": "Enable semantic disfluency removal (filler words, repetitions).", "title": "Enable Ddc", "type": "boolean", "x-sr-order": 404 }, "enable_itn": { "default": true, "description": "Enable inverse text normalization (e.g. 'one hundred twenty three dollars' -> '$123').", "title": "Enable Itn", "type": "boolean", "x-sr-order": 402 }, "enable_punc": { "default": true, "description": "Enable punctuation in the transcription.", "title": "Enable Punc", "type": "boolean", "x-sr-order": 403 }, "enable_speaker_info": { "default": false, "description": "Enable speaker diarization (works best with up to 10 speakers).", "title": "Enable Speaker Info", "type": "boolean", "x-sr-order": 405 }, "language": { "anyOf": [ { "enum": [ "zh-CN", "en-US", "ja-JP", "id-ID", "es-MX", "pt-BR", "de-DE", "fr-FR", "ko-KR", "fil-PH", "ms-MY", "th-TH", "ar-SA", "it-IT", "bn-BD", "el-GR", "nl-NL", "ru-RU", "tr-TR", "vi-VN", "pl-PL", "ro-RO", "ne-NP", "uk-UA", "yue-CN" ], "type": "string" }, { "type": "null" } ], "description": "Language of the audio. Leave empty for automatic recognition of Chinese (incl. major dialects) and English.", "title": "Language", "x-sr-order": 401 }, "show_utterances": { "default": true, "description": "Include sentence-level segments with timestamps in the output.", "title": "Show Utterances", "type": "boolean", "x-sr-order": 406 } }, "required": [ "audio" ], "title": "SpeechToTextInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "description": "Output schema for Doubao Seed ASR 2.0 transcription results.", "properties": { "input_audio_duration": { "description": "The duration of the input audio in seconds", "title": "Input Audio Duration", "type": "integer" }, "text": { "description": "The full transcription text", "title": "Text", "type": "string" }, "utterances": { "anyOf": [ { "items": { "description": "Sentence-level segment with timing information.", "properties": { "end_time": { "description": "End time in milliseconds", "title": "End Time", "type": "integer" }, "start_time": { "description": "Start time in milliseconds", "title": "Start Time", "type": "integer" }, "text": { "description": "The utterance text", "title": "Text", "type": "string" }, "words": { "anyOf": [ { "items": { "description": "Word-level timing information.", "properties": { "end_time": { "description": "End time in milliseconds", "title": "End Time", "type": "integer" }, "start_time": { "description": "Start time in milliseconds", "title": "Start Time", "type": "integer" }, "text": { "description": "The word text", "title": "Text", "type": "string" } }, "required": [ "text", "start_time", "end_time" ], "title": "TranscriptionWord", "type": "object" }, "type": "array" }, { "type": "null" } ], "description": "Word-level timing information", "title": "Words" } }, "required": [ "text", "start_time", "end_time" ], "title": "TranscriptionUtterance", "type": "object" }, "type": "array" }, { "type": "null" } ], "description": "Sentence-level segments (present when show_utterances is enabled)", "title": "Utterances" } }, "required": [ "text", "input_audio_duration" ], "title": "SeedAsr20Output", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "audio": "", "enable_ddc": false, "enable_itn": true, "enable_punc": true, "enable_speaker_info": false, "language": null, "show_utterances": true } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("bytedance/seed-asr-2.0/speech-to-text", { input: { audio: '', language: null, enable_itn: true, enable_punc: true, enable_ddc: false, enable_speaker_info: false, show_utterances: true }, 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-asr-2.0/speech-to-text", arguments={ "audio": "", "language": None, "enable_itn": True, "enable_punc": True, "enable_ddc": False, "enable_speaker_info": False, "show_utterances": True }, 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-asr-2.0/speech-to-text", SubscribeOptions.builder() .input(Map.of( "audio", "", "language", null, "enable_itn", true, "enable_punc", true, "enable_ddc", false, "enable_speaker_info", false, "show_utterances", true)) .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-asr-2.0/speech-to-text", input = mapOf( "audio" to "", "language" to null, "enable_itn" to true, "enable_punc" to true, "enable_ddc" to false, "enable_speaker_info" to false, "show_utterances" to true), 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-asr-2.0/speech-to-text \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"audio":"","language":null,"enable_itn":true,"enable_punc":true,"enable_ddc":false,"enable_speaker_info":false,"show_utterances":true}' ``` ## Model readme undefined