Cartesia speech to text.

Supports:

  • Streaming
  • Turn detection
  • Interim results

See https://docs.cartesia.ai/build-with-cartesia/stt-models/latest

Example

import { voice } from '@livekit/agents';
import { STT, TTS } from '@livekit/agents-plugin-cartesia';

const session = new voice.AgentSession({
stt: new STT(),
llm: new LLM(), // choose your favorite LLM
tts: new TTS(),
turnHandling: { turnDetection: 'stt' },
});

Hierarchy (view full)

Constructors

Accessors

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

    Returns STTCapabilities

  • get model(): string
  • Get the model name/identifier for this STT instance.

    Returns string

    The model name if available, "unknown" otherwise.

    Remarks

    Plugins should override this property to provide their model information.

  • get provider(): string
  • Get the provider name for this STT instance.

    Returns string

    The provider name if available, "unknown" otherwise.

    Remarks

    Plugins should override this property to provide their provider information.

Methods

  • Returns Promise<void>

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

    Parameters

    Returns Promise<SpeechEvent>