## Basic model info - Model name: elevenlabs/elevenlabs scribe-v1 - Model description: API for ElevenLabs Scribe V1 speech-to-text transcription - Endpoint name: speech-to-text ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/elevenlabs/scribe-v1/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input schema for ElevenLabs Scribe V1 speech-to-text transcription.", "properties": { "audio": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ], "description": "Audio file URL.", "title": "Audio", "x-sr-order": 301 }, "language": { "default": "English", "description": "Supported languages from provided_languages.", "enum": [ "Arabic", "Chinese", "English", "French", "German", "Hindi", "Italian", "Japanese", "Korean", "Portuguese", "Russian", "Spanish", "Turkish", "Bengali", "Dutch", "Indonesian", "Persian", "Swahili", "Thai", "Vietnamese" ], "title": "Language", "type": "string", "x-sr-order": 401 }, "speaker_diarization": { "default": false, "description": "Enable speaker diarization.", "title": "Speaker Diarization", "type": "boolean", "x-sr-order": 403 }, "tag_audio_events": { "default": true, "description": "Tag audio events.", "title": "Tag Audio Events", "type": "boolean", "x-sr-order": 402 } }, "required": [ "audio" ], "title": "SpeechToTextInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "description": "Output schema for ElevenLabs Scribe V1 transcription results.", "properties": { "input_audio_duration": { "description": "The duration of the input audio in seconds", "title": "Input Audio Duration", "type": "integer" }, "language_code": { "description": "The detected language code", "title": "Language Code", "type": "string" }, "language_probability": { "description": "The confidence score of the language detection (0 to 1)", "title": "Language Probability", "type": "number" }, "text": { "description": "The raw text of the transcription", "title": "Text", "type": "string" }, "words": { "description": "List of words with their timing information", "items": { "description": "Word-level timing and speaker information.", "properties": { "characters": { "anyOf": [ { "items": { "description": "Character-level timing information.", "properties": { "end": { "description": "End time in seconds", "title": "End", "type": "number" }, "start": { "description": "Start time in seconds", "title": "Start", "type": "number" }, "text": { "description": "The character", "title": "Text", "type": "string" } }, "required": [ "text", "start", "end" ], "title": "CharacterInfo", "type": "object" }, "type": "array" }, { "type": "null" } ], "description": "Character-level timing information", "title": "Characters" }, "end": { "description": "End time in seconds", "title": "End", "type": "number" }, "logprob": { "description": "Log probability of the word", "title": "Logprob", "type": "number" }, "speaker_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Speaker identifier (when diarization is enabled)", "title": "Speaker Id" }, "start": { "description": "Start time in seconds", "title": "Start", "type": "number" }, "text": { "description": "The word text", "title": "Text", "type": "string" }, "type": { "description": "Type of the element", "enum": [ "word", "spacing" ], "title": "Type", "type": "string" } }, "required": [ "text", "type", "logprob", "start", "end" ], "title": "WordInfo", "type": "object" }, "title": "Words", "type": "array" } }, "required": [ "language_code", "language_probability", "text", "words", "input_audio_duration" ], "title": "ScribeV1Output", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "audio": "", "language": "English", "speaker_diarization": false, "tag_audio_events": true } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("elevenlabs/scribe-v1/speech-to-text", { input: { audio: '', language: 'English', tag_audio_events: true, speaker_diarization: false }, 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/scribe-v1/speech-to-text", arguments={ "audio": "", "language": "English", "tag_audio_events": True, "speaker_diarization": False }, 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/scribe-v1/speech-to-text", SubscribeOptions.builder() .input(Map.of( "audio", "", "language", "English", "tag_audio_events", true, "speaker_diarization", false)) .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/scribe-v1/speech-to-text", input = mapOf( "audio" to "", "language" to "English", "tag_audio_events" to true, "speaker_diarization" to false), 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/scribe-v1/speech-to-text \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"audio":"","language":"English","tag_audio_events":true,"speaker_diarization":false}' ``` ## Model readme undefined