import type * as core from "../../../../../core/index.js"; import type * as SarvamAI from "../../../../index.js"; /** * @example * { * file: fs.createReadStream("/path/to/your/file") * } */ export interface SpeechToTextTranscriptionRequest { /** * The audio file to transcribe. Supported formats include WAV, MP3, AAC, AIFF, OGG, OPUS, FLAC, MP4/M4A, AMR, WMA, WebM, and PCM formats. The API automatically detects most codec formats, but for PCM files (pcm_s16le, pcm_l16, pcm_raw), you must specify the input_audio_codec parameter. PCM files are supported only at 16kHz sample rate. * The API works best with audio files sampled at 16kHz. If the audio contains multiple channels, they will be merged into a single channel. */ file: core.file.Uploadable; /** * Specifies the model to use for speech-to-text conversion. * * - **saarika:v2.5** (default): Transcribes audio in the spoken language. * * - **saaras:v3**: State-of-the-art model with flexible output formats. Supports multiple modes via the `mode` parameter: transcribe, translate, verbatim, translit, codemix. */ model?: SarvamAI.SpeechToTextModel; /** * Mode of operation. **Only applicable when using saaras:v3 model.** * * Example audio: 'मेरा फोन नंबर है 9840950950' * * - **transcribe** (default): Standard transcription in the original language with proper formatting and number normalization. * - Output: `मेरा फोन नंबर है 9840950950` * * - **translate**: Translates speech from any supported Indic language to English. * - Output: `My phone number is 9840950950` * * - **verbatim**: Exact word-for-word transcription without normalization, preserving filler words and spoken numbers as-is. * - Output: `मेरा फोन नंबर है नौ आठ चार zero नौ पांच zero नौ पांच zero` * * - **translit**: Romanization - Transliterates speech to Latin/Roman script only. * - Output: `mera phone number hai 9840950950` * * - **codemix**: Code-mixed text with English words in English and Indic words in native script. * - Output: `मेरा phone number है 9840950950` */ mode?: SarvamAI.Mode; /** * Specifies the language of the input audio in BCP-47 format. * * **Note:** This parameter is optional for `saarika:v2.5` model. * * **Available Options:** * - `unknown`: Use when the language is not known; the API will auto-detect. * - `hi-IN`: Hindi * - `bn-IN`: Bengali * - `kn-IN`: Kannada * - `ml-IN`: Malayalam * - `mr-IN`: Marathi * - `od-IN`: Odia * - `pa-IN`: Punjabi * - `ta-IN`: Tamil * - `te-IN`: Telugu * - `en-IN`: English * - `gu-IN`: Gujarati * * **Additional Options (saaras:v3 only):** * - `as-IN`: Assamese * - `ur-IN`: Urdu * - `ne-IN`: Nepali * - `kok-IN`: Konkani * - `ks-IN`: Kashmiri * - `sd-IN`: Sindhi * - `sa-IN`: Sanskrit * - `sat-IN`: Santali * - `mni-IN`: Manipuri * - `brx-IN`: Bodo * - `mai-IN`: Maithili * - `doi-IN`: Dogri */ language_code?: SarvamAI.SpeechToTextLanguage; /** Input Audio codec/format of the input file. PCM files are supported only at 16kHz sample rate. */ input_audio_codec?: SarvamAI.InputAudioCodec; }