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

# RTZR Speech-to-Text

> Streaming Korean STT with RTZRSTTService over RTZR VITO's WebSocket API, with interim results and keyword boosting.

> [!NOTE]
>
> **Community-maintained integration.** This service is built and
> maintained by
> [jhwanseok](https://github.com/jhwanseok)
> . Pipecat does not test or officially support it. Please report issues and
> request changes on the
> [source repository](https://github.com/jhwanseok/pipecat-rtzr)
> . Learn more about
> [community integrations](https://docs.pipecat.ai/api-reference/server/services/community-integrations.md)
> .

## Overview

`RTZRSTTService` provides streaming speech-to-text through
[RTZR](https://rtzr.ai/) (Return Zero) VITO, a Korean speech recognition API.
Its `sommers_ko` model is tuned for Korean telephone audio, which suits
call-center voice agents. The service extends Pipecat's `WebsocketSTTService`
and pushes `InterimTranscriptionFrame` and `TranscriptionFrame` results into
the pipeline. When the VAD reports the end of speech it sends `Finalize`, so
the utterance closes right away instead of waiting for RTZR's own end-point
detection.

> **[Source Repository](https://github.com/jhwanseok/pipecat-rtzr)**
>
> Source code, README, and issues for the RTZR integration

> **[Example](https://github.com/jhwanseok/pipecat-rtzr/blob/main/example.py)**
>
> A Korean voice bot with RTZR STT

> **[RTZR Streaming STT Reference](https://developers.rtzr.ai/docs/en/stt-streaming/websocket/)**
>
> Endpoint, parameters, and messages

> **[RTZR Developers](https://developers.rtzr.ai/)**
>
> Create a client ID and secret

> **[PyPI Package](https://pypi.org/project/pipecat-rtzr/)**
>
> The `pipecat-rtzr` package on PyPI

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`:

```bash theme={null}
uv add pipecat-rtzr
```

## Prerequisites

### RTZR Account Setup

Before using the RTZR STT service, you need:

1. **RTZR Account**: Sign up at the [RTZR Developers Console](https://developers.rtzr.ai/)
2. **Client ID and Secret**: Create a client in the console

### Required Environment Variables

* `RTZR_CLIENT_ID`: Your RTZR client ID
* `RTZR_CLIENT_SECRET`: Your RTZR client secret

The service exchanges them for an access token, caches it, and refreshes it
before it expires.

## Configuration

**client\_id** `str` (default: None)

RTZR client ID. Defaults to the `RTZR_CLIENT_ID` environment variable.

**client\_secret** `str` (default: None)

RTZR client secret. Defaults to the `RTZR_CLIENT_SECRET` environment
variable.

**api\_base** `str` (default: [https://openapi.vito.ai](https://openapi.vito.ai))

Base URL of the RTZR OpenAPI. The WebSocket URL is derived from it.

**sample\_rate** `int` (default: None)

Sample rate of the incoming audio in Hz (8000 to 48000). If `None`, uses the
pipeline's input sample rate. 8 kHz is the native telephony rate.

**vad\_force\_finalize** `bool` (default: True)

Send `Finalize` when the VAD reports the end of speech. Without it, an
utterance cut off mid-speech is not finalized until the stream ends.

**eos\_flush\_timeout** `float` (default: 2.0)

Seconds to wait for the last transcript after `EOS` on shutdown, when an
utterance is still open. `0` closes right after sending `EOS`.

**settings** `RTZRSTTService.Settings` (default: None)

Runtime-updatable settings. See [Settings](#settings) below.

**ttfs\_p99\_latency** `float` (default: None)

P99 latency from speech end to final transcript, in seconds, used by turn
strategies. This value has not been measured for Pipecat, so Pipecat's default
applies if `None`. Measure your deployment with
[stt-benchmark](https://github.com/pipecat-ai/stt-benchmark) and pass the
result.

### Settings

Runtime-configurable settings passed via the `settings` constructor argument
using `RTZRSTTService.Settings(...)`. These can be updated mid-conversation with
`STTUpdateSettingsFrame`; a change reconnects the stream, because RTZR reads
them from the connection URL.

| Parameter | Type | Default | Description |
| - | - | - | - |
| `model` | `str` | `"sommers_ko"` | `"sommers_ko"`, `"sommers_ja"`, or `"whisper"`. |
| `language` | `Language \| str \| None` | `Language.KO` | Sent only for the `"whisper"` model. |
| `domain` | `str` | `"CALL"` | `"CALL"` (telephony) or `"MEETING"`. |
| `use_itn` | `bool` | `True` | Inverse text normalization, such as numbers and dates. |
| `use_disfluency_filter` | `bool` | `False` | Drop filler words. |
| `use_profanity_filter` | `bool` | `False` | Mask profanity. |
| `use_punctuation` | `bool` | `False` | Add punctuation to transcripts. |
| `keywords` | `list[str \| tuple[str, float]] \| None` | `None` | Words to boost, as `"word"` or `("word", score)` with a score from -5.0 to 5.0. Up to 100 words of 20 characters. `sommers_ko` only. |
| `epd_time` | `float \| None` | `None` | End-point detection silence in seconds. The server default applies if `None`. |
| `noise_threshold` | `float \| None` | `None` | Noise gate threshold. The server default applies if `None`. |
| `active_threshold` | `float \| None` | `None` | Speech activity threshold. The server default applies if `None`. |

## Usage

### Basic Setup

```python theme={null}
import os

from pipecat_rtzr import RTZRSTTService

stt = RTZRSTTService(
    client_id=os.getenv("RTZR_CLIENT_ID"),
    client_secret=os.getenv("RTZR_CLIENT_SECRET"),
)

# ... add stt to your pipeline, after a VAD
```

### With Punctuation and Keyword Boosting

```python theme={null}
from pipecat_rtzr import RTZRSTTService

stt = RTZRSTTService(
    settings=RTZRSTTService.Settings(
        use_punctuation=True,
        keywords=[("리턴제로", 3.0), "상담원"],
    ),
)
```

## Notes

* **Audio format**: The service sends 16-bit mono PCM (`LINEAR16`).
* **Reconnects**: If the socket drops, the service reconnects automatically. The
  utterance in progress when it dropped is lost, because audio is not replayed.
* **Idle connections**: RTZR can close a connection that receives no audio for
  60 seconds, so the service sends silent audio as a keepalive.
* **Concurrency**: Streaming channels are limited by your RTZR plan.

## Compatibility

Tested with Pipecat 1.13.0 and Python 3.11 and 3.12.


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