> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lokutor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI Agents SDK (voice)

> Use Lokutor speech-to-text and text-to-speech in the OpenAI Agents SDK VoicePipeline with the lokutor-agents-voice adapter.

The Agents SDK's built-in OpenAI voice models cannot be redirected to Lokutor with a base URL alone: the TTS model requests
raw 24 kHz PCM (Lokutor always returns a 44.1 kHz WAV) and `transcribe()` uses the Realtime WebSocket API. The
[`lokutor-agents-voice`](https://github.com/lokutor-ai/lokutor-agents-voice) adapter calls
`/v1/audio/speech` and `/v1/audio/transcriptions` and converts the audio.

```bash theme={null}
pip install git+https://github.com/lokutor-ai/lokutor-agents-voice
export LOKUTOR_API_KEY=...
```

```python theme={null}
from agents.voice import VoicePipeline, SingleAgentVoiceWorkflow
from lokutor_agents_voice import LokutorVoiceModelProvider

provider = LokutorVoiceModelProvider(voice="F1", language="en")
pipeline = VoicePipeline(
    workflow=SingleAgentVoiceWorkflow(agent),
    stt_model=provider.get_stt_model(None),
    tts_model=provider.get_tts_model(None),
)
```

## Limits

* Push-to-talk input only (`AudioInput`). `StreamedAudioInput` is not implemented; use [`/ws/stt`](https://docs.lokutor.com/api-reference/speech-to-text) directly.
* One synthesis request per text chunk; audio is resampled to 24 kHz with linear interpolation.

## Verification

Run against the live API with openai-agents 0.24.0: a TTS to STT round trip and a `VoicePipeline` with an echo workflow.
Not run: `SingleAgentVoiceWorkflow` with an LLM, and streamed input.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.