Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
CartesiaSTT
Streaming speech-to-text with Cartesia’s Ink models over WebSocket. A good choice for low-latency transcription in real-time voice agents. Authenticates with CARTESIA_API_KEY from your environment, or an explicitapi_key.
Fields
ISO 639-1 language code of the speech, e.g. “en” or “es”. Only applies to ink-whisper models. Defaults to ‘en’.
Sample rate of incoming audio in Hz. Leave unset to detect it automatically. Defaults to None (not set).
Sample rate in Hz of the audio sent to Cartesia; leave unset to use 16000. Defaults to None (not set).
Deprecated alias for input_sample_rate; do not pass both. Defaults to None (not set).
WebSocket URL of the Cartesia speech-to-text endpoint. Change only for a proxy or private deployment. Defaults to ‘wss://api.cartesia.ai/stt/websocket’.