An instance of a speech-to-text adapter.

Remarks

This class is abstract, and as such cannot be used directly. Instead, use a provider plugin that exports its own child STT class, which inherits this class's methods.

Hierarchy (view full)

Constructors

  • Create a new instance of Sarvam AI STT.

    Parameters

    Returns STT

    Remarks

    apiKey must be set to your Sarvam API key, either using the argument or by setting the SARVAM_API_KEY environment variable.

    Supported models:

    • saaras:v3 (default, recommended) — supports all 22 languages, modes, prompt, timestamps, and uses /speech-to-text.
    • saaras:v2.5 — Indic-to-English translation via /speech-to-text-translate. Auto-detects source language. Supports prompt.
    • saarika:v2.5 — will be deprecated soon. Supports timestamps. All its languages are available in saaras:v3.

    See

Properties

label: string = 'sarvam.STT'

Accessors

  • get capabilities(): STTCapabilities
  • Returns this STT's capabilities

    Returns STTCapabilities

Methods

  • Returns Promise<void>

  • Receives an audio buffer and returns transcription in the form of a SpeechEvent

    Parameters

    Returns Promise<SpeechEvent>