Member Junction
    Preparing search index...

    Class SpeechToTextParams

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    audioData?: Buffer

    The raw audio bytes, as an alternative to the base 64 audioFile.

    Preferred whenever the caller already holds a Buffer: base 64 encoding an hour of audio costs a third more memory than the bytes themselves, for a string the implementation immediately decodes again.

    audioFile: string

    Base 64 encoded audio file to convert to text.

    Optional only in the sense that audioData may be supplied instead; exactly one of the two is required.

    fileName?: string

    Original file name, e.g. episode-104.mp3. Some providers infer the container format from the extension, so supplying it when known improves reliability.

    language?: string

    ISO 639-1 language code of the spoken audio. Supplying it typically improves both accuracy and latency versus letting the model detect the language.

    maxOutputTokens?: number

    Model max output response tokens, optional.

    model: string

    Model name, required.

    modelSpecificResponseFormat?: any

    The standard response formats may not be sufficient for all models. This field allows for a model-specific response format to be specified. For this field to be used, responseFormat must be set to 'ModelSpecific'.

    prompt?: string

    Optional text to steer style, spelling or vocabulary — e.g. proper nouns the model would otherwise mis-transcribe. Should be in the same language as the audio.

    reasoningBudgetTokens?: number

    Model max budget tokens that we may use for reasoning in reasoning models, optional.

    responseFormat?: "Any" | "Text" | "Markdown" | "JSON" | "ModelSpecific" = 'Any'

    Specifies the format that the model should output. Not all models support all formats. If not specified, the default is 'Any'.

    seed?: number

    Optional seed for reproducible outputs. Not all models support seeding, but when supported, using the same seed with the same inputs should produce identical outputs.

    stopSequences?: string[]

    Optional array of sequences where the model will stop generating further tokens. The returned text will not contain the stop sequence.

    temperature?: number

    Model temperature, optional.