pipecat-ru
Russian-language plugins for the Pipecat voice framework: local STT and TTS, plus the text and turn-taking pieces that make a Russian voice assistant feel natural.
Pipecat's built-in services and defaults are tuned for English. Out of the box, a Russian bot reads "15.03 в 14:30" digit by digit and waits for a whole sentence before it speaks. It also stops mid-sentence whenever you say "угу". This package fixes that with open models that run on your own GPU.
| Piece | What it does |
|---|---|
GigaAMSTTService |
Final Russian transcripts with punctuation from GigaAM v3. Stronger on Russian than Whisper, and it does not hallucinate on silence. |
Qwen3TTSService |
Qwen3-TTS speech, with voice cloning from a short Russian reference clip. |
SileroTTSService |
Silero v5: fast CPU fallback voice. Weights are non-commercial (CC BY-NC 4.0). |
RussianTextNormalizer |
Spells out numbers, dates, times, money, units and abbreviations (т.е., ул., в 2024 г.). Applies a pronunciation lexicon and optional stress marks via ruaccent. |
RussianTextAggregator |
Sentence/clause splitter that makes the first chunk of every reply a short clause, so the first audio starts sooner. |
BackchannelUserTurnStartStrategy |
While the bot speaks, short "ага / угу / да / так" (under ~600 ms) do not interrupt it, but "стоп" still does. Pairs with smart-turn v3.2, which understands Russian. |
pipecat-ru-bench |
WER and latency on a folder of your own recordings. Time to first audio for the TTS engines. |
Install
pip install pipecat-ru # text tools + turn strategy (no torch)
pip install "pipecat-ru[gigaam,qwen,silero,accent]"
pip install --no-deps "gigaam @ git+https://github.com/salute-developers/GigaAM"
GigaAM v3 is not on PyPI (the gigaam name there is an old v1 build), so it is installed
from GitHub, with --no-deps: GigaAM pins onnxruntime==1.23.*, which conflicts with
pipecat-ai's onnxruntime>=1.24.3, and it only needs onnxruntime for ONNX export. The
gigaam extra installs the rest of its dependencies. GigaAM also needs ffmpeg on PATH for its file-based API. This package feeds
it tensors directly, so ffmpeg is only used as a fallback.
RTX 50xx (Blackwell) on Windows: install a CUDA 12.8+ build of PyTorch before the extras,
for example pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu128.
Older wheels do not support sm_120. flash-attn is optional. Pass
attn_implementation="flash_attention_2" to Qwen3TTSService only if it is installed.
qwen-ttspinstransformers==4.57.3. Do not installpipecat-ai[local-smart-turn]in the same environment, because it requires transformers 5.x. You do not need it: smart-turn v3.2 runs on pipecat-ai's core ONNX runtime.
Quick start
from pipecat.audio.vad.silero import SileroVADAnalyzer
from pipecat.audio.vad.vad_analyzer import VADParams
from pipecat.processors.aggregators.llm_response_universal import (
LLMContextAggregatorPair, LLMUserAggregatorParams,
)
from pipecat_ru.stt.gigaam import GigaAMSTTService
from pipecat_ru.tts.qwen3 import Qwen3TTSService
from pipecat_ru.turns import russian_user_turn_strategies
stt = GigaAMSTTService(device="cuda")
tts = Qwen3TTSService(ref_audio="my_voice.wav", ref_text="Точный текст этой записи.")
aggregators = LLMContextAggregatorPair(
context,
user_params=LLMUserAggregatorParams(
vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=0.2)),
user_turn_strategies=russian_user_turn_strategies(),
),
)
pipeline = Pipeline([transport.input(), stt, aggregators.user(), llm, tts,
transport.output(), aggregators.assistant()])
examples/local_bot.py is a complete microphone-to-speaker bot. It
uses a local OpenAI-compatible LLM and Silero as automatic failover for Qwen3-TTS.
Components
GigaAM STT
GigaAMSTTService is a Pipecat SegmentedSTTService: the VAD cuts speech into utterances,
and each one is transcribed in a worker thread. The default model is v3_e2e_rnnt, which gives
punctuation and normalized text. v3_e2e_ctc is faster. Utterances over 24 s are split at
quiet points, because GigaAM's short-form API stops at 25 s. You can pass a loaded model= to
share one model between services. Otherwise the model loads when the pipeline starts.
Checkpoints normally come from SberDevices' CDN through the gigaam package. If that download
fails (in November 2026 the CDN served an expired TLS certificate), the loader falls back to the
official Hugging Face mirror ai-sage/GigaAM-v3. It fetches only the weights, the config and the
tokenizer at a pinned commit; no remote code runs. Choose the source explicitly with
GigaAMSTTService(source="package" | "hf" | "auto").
TTS: Qwen3-TTS and Silero
Both services synthesize in a worker thread and stream the audio out in 200 ms frames. Silero synthesizes one text chunk per call. Qwen3-TTS on a CUDA GPU streams audio as it is generated (see below).
- Qwen3-TTS voice clone:
Qwen3TTSService(ref_audio=..., ref_text=...)with the 1.7B or 0.6B Base model. The clone prompt is built once at startup. - Qwen3-TTS preset speaker:
Qwen3TTSService(speaker="Ryan", instruct="...")with a CustomVoice model. - Silero:
SileroTTSService(speaker="xenia"), with speakersaidar,baya,kseniya,xeniaandeugene. It runs on the CPU. Silero reads+stress marks natively.
Fast Qwen3-TTS (default on CUDA). Through qwen-tts and Hugging Face generate(),
Qwen3-TTS is slower than real time even on an RTX 5090. Each 80 ms codec frame takes one talker
step plus 15 small code-predictor steps, and the loop is bound by kernel launches. So on a CUDA
device Qwen3TTSService uses its own generator. It keeps the qwen-tts weights and prompt
building, and runs the talker and code predictor on fixed-size KV caches. One whole frame,
sampling included, is captured as a single CUDA graph, and audio is decoded and sent while later
frames are generated. It needs only torch and qwen-tts: no Triton, flash-attn or vLLM. Options:
first_chunk_frames (default 3, i.e. 240 ms of audio in the first chunk), chunk_frames (8),
max_seq_len (2048 tokens: prompt plus about 2.5 minutes of audio). fast=False goes back to
plain qwen-tts calls. Sampling follows qwen-tts (top-k, temperature, repetition penalty),
but the random draws differ, so the same seed gives different audio than qwen-tts.
Both services install the Russian splitter and normalizer by default:
normalizer=None / splitter=None turn them off, or pass your own.
Text normalizer
from pipecat_ru.text import RussianTextNormalizer, StressMarker
n = RussianTextNormalizer(lexicon={"Мустикон": "Мустик+он"})
n("Встреча 15.03.2025 в 14:30, т.е. через 2 дня.")
# 'Встреча пятнадцатое марта две тысячи двадцать пятого года в четырнадцать часов
# тридцать минут, то есть через два дня.'
n("Работаем с 9:00 до 18:00, ул. Ленина д. 7")
# 'Работаем с девяти до восемнадцати, улица Ленина дом семь'
with_stress = RussianTextNormalizer(stress=StressMarker("plus")) # з+амок (Silero)
The steps run in order:
- A lexicon of names the TTS would mangle (
Claude Code→Клод Код,GitHub→Гитхаб). It is extensible and can be switched off. - Russian pre-rules for cases rutextnorm misses: abbreviations,
в 2024 г., time ranges in the genitive, ages,версия 3.12. - rutextnorm for numbers, dates, money and units, with case agreement.
- Optional ruaccent stress marks, written as
+(Silero), as a combining acute accent, or stripped.
To use the normalizer with any Pipecat TTS, pass
text_transforms=[("*", normalizer.transform)].
Fast first chunk
RussianTextSplitter / RussianTextAggregator release the first chunk of a reply at the
first , ; : or dash, once it holds 3 words. After that they release whole sentences, and
cut a sentence longer than 220 characters at a clause boundary. Abbreviations, initials and
decimals never split a chunk. Tune it with SplitterConfig.
RussianTextSplitter().split("Хорошо, сейчас посмотрю, что там с погодой. Завтра ясно.")
# ['Хорошо, сейчас посмотрю,', 'что там с погодой.', 'Завтра ясно.']
Backchannels do not interrupt
russian_user_turn_strategies() returns Pipecat UserTurnStrategies. The start strategy is
BackchannelUserTurnStartStrategy and the stop strategy is smart-turn v3.2
(LocalSmartTurnAnalyzerV3).
The start strategy replaces Pipecat's default VAD and transcription start strategies:
- Bot silent: a turn starts on speech, as before.
- Bot speaking: an utterance interrupts only if it lasts longer than
max_backchannel_secs(0.6 s) or its transcript has a word that is not a backchannel. A short "ага" is dropped from the context, and the bot keeps talking.
Set vad_stop_secs to the stop_secs of your VAD. Edit the vocabulary with backchannels=.
Benchmark on your own voice
# folder: 001.wav + 001.txt (reference), ... or a transcripts.tsv "file<TAB>text"
pipecat-ru-bench stt my_phrases/ --device cuda --csv stt.csv
pipecat-ru-bench tts --engine qwen3 --ref-audio me.wav --ref-text "..." --save-dir out/
pipecat-ru-bench tts --engine silero
STT reports WER and CER (numbers are spelled out on both sides before scoring), latency p50, p90 and max, and the real-time factor. TTS reports time to first audio and the RTF.
Measured performance
Measured on an RTX 5090 (32 GB) with Windows 11, torch 2.11+cu128 and bf16. Numbers come from
tests/test_gpu_integration.py and examples/make_samples.py.
| Step | Result |
|---|---|
| GigaAM v3 e2e-RNNT, 4 s phrase | 66 ms, transcript exact |
| Normalizer (no stress) | 0.25 ms per sentence |
ruaccent stress (turbo3.1, CPU) |
12–60 ms per chunk |
| Silero v5 (CPU), first chunk | 60–140 ms; a 10 s reply in 0.25 s |
| Qwen3-TTS 1.7B, fast path (CustomVoice and Base clone) | first audio 85–88 ms (worst 117 ms), RTF 0.24–0.26 |
| Qwen3-TTS 0.6B CustomVoice, fast path | first audio 81 ms, RTF 0.22–0.23 |
Qwen3-TTS 1.7B through plain qwen-tts 0.1.1 (fast=False) |
RTF ≈ 1.4; first audio 3–10 s (whole chunk) |
Qwen3-TTS numbers are medians over 5–8 runs of a 24-character clause («Хорошо, сейчас
посмотрю,») and an 85-character sentence. First audio is the time from the text reaching
Qwen3TTSService.run_tts to its first audio frame, measured in the Pipecat service with sdpa
attention and no flash-attn. The fast path speeds up the 1.7B model about 5.7×. Startup (loading
plus CUDA-graph capture and warmup) takes 9–13 s, and the 1.7B model uses about 4.2 GB of GPU
memory. Through plain qwen-tts, Hugging Face generate() keeps the GPU only about 8% busy and
runs slower than real time. All fast-path outputs transcribe back correctly with GigaAM. Their
lengths vary from run to run about as much as plain qwen-tts outputs do (sampling is on).
ruaccent resolves common homographs («повесил зам+ок», «насыпь мук+у»). It can still pick the wrong reading in ambiguous sentences («замок на воротах сломан»). Stress is added per TTS chunk, so the model sees less context than in the whole reply.
Model licences
The code in this repository is Apache-2.0. The models have their own licences, and you accept them when you download the weights.
| Model / data | Used by | Licence | Commercial use |
|---|---|---|---|
| GigaAM v3 (SberDevices) | GigaAMSTTService |
MIT | yes |
| Qwen3-TTS (Alibaba Qwen) | Qwen3TTSService |
Apache-2.0 | yes |
| Silero TTS v5 | SileroTTSService |
CC BY-NC 4.0 | no (licence from the authors needed) |
| ruaccent | StressMarker (optional) |
MIT (per its README) | yes |
| rutextnorm | RussianTextNormalizer |
MIT | yes |
| smart-turn v3.2 (Pipecat) | russian_user_turn_strategies |
BSD-2-Clause | yes |
| Silero VAD | Pipecat's SileroVADAnalyzer |
MIT | yes |
Licences change. Check each model card before you ship anything.
Tests
uv sync
uv run pytest # all models are mocked: no GPU, no downloads
Optional real-model tests for a CUDA machine (written for an RTX 5090 on Windows 11):
uv sync --all-extras
uv pip install --no-deps "gigaam @ git+https://github.com/salute-developers/GigaAM"
$env:PIPECAT_RU_GPU_TESTS = "1"
$env:PIPECAT_RU_REF_AUDIO = "C:\voice\me.wav" # optional, for voice cloning
$env:PIPECAT_RU_REF_TEXT = "Текст этой записи."
uv run pytest -m gpu -s
Status and roadmap
Alpha, built for a personal assistant and published in case it helps others. Planned:
- a streaming partials STT (T-one or NVIDIA Nemotron streaming ASR), so backchannels and interruptions can be judged before the utterance ends;
- streaming text input for Qwen3-TTS (start speaking while the LLM sentence is still arriving).
See CONTRIBUTING.md and CHANGELOG.md.
Metadata
Release files for pipecat-ru 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pipecat_ru-0.1.0.tar.gz | 72.9 kB | With provenance | Details for pipecat_ru-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pipecat_ru-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pipecat_ru-0.1.0-py3-none-any.whl |
Total release size: 127.9 kB
Release files / pipecat_ru-0.1.0.tar.gz
| Download URL | pipecat_ru-0.1.0.tar.gz |
|---|---|
| Size | 72.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f655cb036b804f52166dff5090cda233a3e710af800cbea54c87364dca661fe6
|
|
BLAKE2b-256 checksum How to use checksums |
b5122b3bcaff5155edeb92ec1d6378eab169abf8963af8ecddd87fcb1fbb0f9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / pipecat_ru-0.1.0-py3-none-any.whl
| Download URL | pipecat_ru-0.1.0-py3-none-any.whl |
|---|---|
| Size | 55.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e331686453bc2b401a94b45f0490a4957ce75df09c35624ef4f8095a7580b42
|
|
BLAKE2b-256 checksum How to use checksums |
dcbcd8e8d365607755a5fd8645f4f118b424c99b2f31c5d3535bdc8e5b621acb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logSecurity for pipecat-ru 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pipecat_ru-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.