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

# Speech To Text (STT)

Speech-to-Text (STT) converts spoken audio into text. In a custom voice pipeline, STT sits between the call and the LLM: user speaks → **STT** transcribes → turn signal → **LLM** → **TTS**. See [Voice Agents](/introduction/voice-agents#custom-pipeline-mode) for the full wiring guide.

```mermaid theme={null}
flowchart LR
    Audio[Spoken audio] --> STT[STT plugin]
    STT --> Text[Transcript text]
```

## Quick Start

```bash theme={null}
uv add "vision-agents[deepgram,inworld,getstream]"
```

Add keys to your `.env`:

```bash theme={null}
STREAM_API_KEY=...
STREAM_API_SECRET=...
DEEPGRAM_API_KEY=...
```

```python theme={null}
from dotenv import load_dotenv

from vision_agents.core import Agent, User
from vision_agents.plugins import deepgram, gemini, getstream, inworld

load_dotenv()

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Assistant", id="agent"),
    instructions="You are a helpful voice assistant.",
    llm=gemini.LLM(),
    stt=deepgram.STT(eager_turn_detection=True),
    tts=inworld.TTS(),
)
```

The SDK captures audio from your Stream call and feeds it to the STT provider in real time. As people speak, you receive live transcripts.

```mermaid theme={null}
flowchart TB
    Participants[Call participants] --> Edge[Edge transport]
    Edge --> Agent[Agent audio input]
    Agent --> STT[STT plugin]
    STT --> Partial[Partial transcripts]
    STT --> Final[Final transcripts]
    STT --> Turns[TurnStarted / TurnEnded]
    Final --> Events[UserTranscriptEvent]
    Turns --> Pipeline[LLM turn timing]
```

## Providers

| Plugin       | Turn detection       | Latency model             | Integration                                    |
| ------------ | -------------------- | ------------------------- | ---------------------------------------------- |
| Deepgram     | Yes (eager optional) | Streaming                 | [Deepgram](/integrations/stt/deepgram)         |
| ElevenLabs   | Yes (VAD commit)     | Streaming                 | [ElevenLabs](/integrations/stt/elevenlabs)     |
| Cartesia     | Yes (eager default)  | Streaming                 | [Cartesia](/integrations/stt/cartesia)         |
| AssemblyAI   | Yes                  | Streaming                 | [AssemblyAI](/integrations/stt/assemblyai)     |
| Sarvam       | Yes                  | Streaming                 | [Sarvam](/integrations/stt/sarvam)             |
| Fast-Whisper | No                   | Local batch (\~2s buffer) | [Fast-Whisper](/integrations/stt/fast-whisper) |
| Wizper       | No                   | Cloud (Fal.ai)            | [Wizper](/integrations/stt/wizper)             |
| Fish         | No                   | Batch                     | [Fish](/integrations/stt/fish)                 |
| Mistral      | No                   | Streaming                 | [Mistral](/integrations/stt/mistral)           |

<Tip>
  **Fast-Whisper** runs locally on your machine. **Wizper** uses Fal.ai cloud — it is not a local model.
</Tip>

STT plugins without built-in turn detection need an external [turn detection](/ai-technologies/turn-detection) plugin, or the agent falls back to using the final transcript as the end-of-turn signal.

## Transcripts

STT providers emit partial, replacement, and final transcripts. Subscribe to agent events to handle them in your application:

```python theme={null}
from vision_agents.core.agents.events import UserTranscriptEvent

@agent.events.subscribe
async def on_transcript(event: UserTranscriptEvent):
    print(event.text)
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Voice Agents" icon="microphone" href="/introduction/voice-agents">
    Wire STT into a full voice pipeline
  </Card>

  <Card title="Turn Detection" icon="wave-pulse" href="/ai-technologies/turn-detection">
    When the agent starts and stops listening
  </Card>
</CardGroup>
