LiveKit docs › Partner spotlight › OpenAI › OpenAI STT

---

# OpenAI STT plugin guide

> How to use the OpenAI STT plugin for LiveKit Agents.

Available in:
- [x] Node.js
- [x] Python

## Overview

This plugin allows you to use [OpenAI](https://developers.openai.com) as an STT provider for your voice agents.

### Installation

Install the plugin from PyPI:

**Python**:

```shell
uv add "livekit-agents[openai]~=1.5"

```

---

**Node.js**:

```shell
pnpm add @livekit/agents-plugin-openai@1.x

```

### Authentication

The OpenAI plugin requires an [OpenAI API key](https://platform.openai.com/api-keys).

Set `OPENAI_API_KEY` in your `.env` file.

### Usage

Use OpenAI STT in an `AgentSession` or as a standalone transcription service. For example, you can use this STT in the [Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md).

**Python**:

```python
from livekit.plugins import openai

session = AgentSession(
  stt = openai.STT(
    model="gpt-4o-mini-transcribe",
  ),
  # ... llm, tts, etc.
)

```

---

**Node.js**:

```typescript
import * as openai from '@livekit/agents-plugin-openai';
import * as silero from '@livekit/agents-plugin-silero';

const vad = await silero.VAD.load();

const session = new voice.AgentSession({
    stt: new openai.STT({
        model: 'gpt-realtime-whisper',
        vad,
    }),
    // ... llm, tts, etc.
});

```

> 💡 **VAD requirement**
> 
> The `gpt-realtime-whisper` model doesn't support server-side turn detection. You must pass a `vad` instance so the plugin can commit the audio buffer at end-of-speech.

> ℹ️ **Default model change in Node.js**
> 
> In `@livekit/agents-plugin-openai@1.4.1`, the default model for `openai.STT` changed from `whisper-1` to `gpt-realtime-whisper`, which streams transcription over a WebSocket. To restore the previous behavior, set `useRealtime: false`:
> 
> ```typescript
> const stt = new openai.STT({ useRealtime: false });
> 
> ```

### Parameters

This section describes some of the available parameters. See the plugin reference links in the [Additional resources](#additional-resources) section for a complete list of all available parameters.

- **`model`** _(WhisperModels | string)_ (optional) - Default: `gpt-4o-mini-transcribe | gpt-realtime-whisper`: Model to use for transcription. See OpenAI's documentation for a list of [supported models](https://developers.openai.com/docs/models#transcription).

Default model varies by SDK:

- Python: `gpt-4o-mini-transcribe`
- Node.js: `gpt-realtime-whisper`

- **`language`** _(LanguageCode)_ (optional) - Default: `en`: [Language code](https://docs.livekit.io/agents/models/stt.md#language-codes) for the input audio. See OpenAI's documentation for a list of [supported languages](https://developers.openai.com/docs/guides/speech-to-text#supported-languages).

- **`useRealtime`** _(boolean)_ (optional) - Default: `true`: Available in:
- [x] Node.js
- [ ] Python

When `true`, streams transcription over the OpenAI Realtime WebSocket. Set to `false` to use the standard REST transcription API with `whisper-1`.

- **`vad`** _(VAD)_ (optional): Available in:
- [x] Node.js
- [ ] Python

A VAD instance for client-side end-of-speech detection. Required when using `gpt-realtime-whisper`, because this model doesn't support server-side turn detection.

## Additional resources

The following resources provide more information about using OpenAI with LiveKit Agents.

- **[OpenAI docs](https://developers.openai.com/docs/guides/speech-to-text)**: OpenAI STT docs.

- **[Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md)**: Get started with LiveKit Agents and OpenAI STT.

- **[OpenAI ecosystem guide](https://docs.livekit.io/agents/integrations/openai.md)**: Overview of the entire OpenAI and LiveKit Agents integration.

---

This document was rendered at 2026-06-07T11:35:37.998Z.
For the latest version of this document, see [https://docs.livekit.io/agents/models/stt/openai.md](https://docs.livekit.io/agents/models/stt/openai.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).