# Speechmatics (/en/ai/models/asr/speechmatics)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

> Documentation: Conversational AI.
> Documentation version: Main.
> This document describes only this version. [Version index](/llms/doc-versions-convoai-guides-v1.txt).


Speechmatics provides real-time automatic speech recognition (ASR) with flexible language support and reliable performance for conversational AI applications.

### Sample configuration

The following example shows how to configure Speechmatics ASR when starting a conversational AI agent.

**Python SDK**

```python
from agora_agent import Agent, SpeechmaticsSTT

# client is your configured Agora client
agent = (
    Agent(client)
    .with_stt(SpeechmaticsSTT(
        key='your-speechmatics-key',
        language='en',
        uri='wss://eu2.rt.speechmatics.com/v2',
    ))
    .with_llm(...)  # configure your LLM vendor
    .with_tts(...)  # configure your TTS vendor
)
```

**TypeScript SDK**

```typescript
import { Agent, SpeechmaticsSTT } from 'agora-agents';

// client is your configured Agora client
const agent = new Agent({ client })
  .withStt(new SpeechmaticsSTT({
    key: 'your-speechmatics-key',
    language: 'en',
    uri: 'wss://eu2.rt.speechmatics.com/v2',
  }))
  .withLlm(/* configure your LLM vendor */)
  .withTts(/* configure your TTS vendor */);
```

**Go SDK**

```go
import (
    "github.com/AgoraIO/agora-agents-go/v2/agentkit"
    "github.com/AgoraIO/agora-agents-go/v2/agentkit/vendors"
)

// client is your configured Agora client
agent := agentkit.NewAgent(client).WithStt(
    vendors.NewSpeechmaticsSTT(vendors.SpeechmaticsSTTOptions{
        Key:      "your-speechmatics-key",
        Language: "en",
        URI:      "wss://eu2.rt.speechmatics.com/v2",
    }),
).WithLlm(/* configure your LLM vendor */).
  WithTts(/* configure your TTS vendor */)
```

**REST API**

Use the following `asr` configuration in your request:

```json
"asr": {
  "vendor": "speechmatics",
  "language": "en-US",
  "params": {
    "key": "<speechmatics_key>",
    "language": "en",
    "uri": "wss://eu2.rt.speechmatics.com/v2"
  }
}
```

### Key parameters

**params required**

**`key` (string) required**

The Speechmatics API key used to authenticate requests. You must provide a valid key for the service to function.

**`language` (string) required**

The language code to use for transcription. For example, use `en` for English.

**`uri` (string) optional**

The WebSocket URL for the Speechmatics streaming API. Specify this to target a particular region. For example, `wss://eu2.rt.speechmatics.com/v2`.

> **Caution**
>
> The parameters listed on this page are validated for use with Conversational AI Engine. Required parameters must be provided as documented. Any additional parameters are passed through directly to the underlying vendor without validation. For a full list of supported options, refer to the [Speechmatics documentation](https://docs.speechmatics.com/api-ref/realtime-transcription-websocket).
