# voicekit-team/t-one architecture

> Architecture diagram of the GitHub repository voicekit-team/t-one, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/voicekit-team/t-one
- Repository: https://github.com/voicekit-team/t-one

## Overview

T-one is a Russian telephony-focused streaming CTC speech-recognition product. Its principal workflow accepts audio chunks, computes acoustic log-probabilities, splits them into phrases at silence boundaries, decodes phrase text, and returns text with timings. The graph also preserves the documented browser demo, Triton export/inference, and fine-tuning capabilities. Runtime wiring is based on the supplied excerpts and README; unsampled implementations are represented only where the tree supports a path.

Main entry points: [`tone/pipeline.py`](https://github.com/voicekit-team/t-one/blob/main/tone/pipeline.py) (Streaming pipeline), [`tone/decoder.py`](https://github.com/voicekit-team/t-one/blob/main/tone/decoder.py) (CTC decoders), [`tone/demo/website.py`](https://github.com/voicekit-team/t-one/blob/main/tone/demo/website.py) (Browser demo service), [`tone/nn/model.py`](https://github.com/voicekit-team/t-one/blob/main/tone/nn/model.py) (Streaming acoustic model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inference["Streaming recognition"]
  node_pipeline["Streaming pipeline<br/>[pipeline.py]"]
  node_splitter["Phrase splitter"]
  node_decoder["CTC decoders<br/>[decoder.py]"]
end

subgraph group_acoustic["Acoustic model"]
  node_acoustic_model["Streaming acoustic model<br/>[model.py]"]
  node_conformer["Conformer encoder<br/>[conformer.py]"]
  node_conformer_blocks["Conformer blocks"]
  node_model_parts["Model submodules<br/>[submodules.py]"]
end

subgraph group_serving["Serving and export"]
  node_audio_reader["Audio reader<br/>[read_audio.py]"]
  node_web_demo["Browser demo service<br/>[website.py]"]
  node_export["Model export<br/>[export.py]"]
  node_onnx_wrapper["ONNX wrapper<br/>[onnx_wrapper.py]"]
  node_triton_config["Triton model configs<br/>[config.pbtxt]"]
  node_triton_trt_config["TensorRT model config<br/>[config.pbtxt]"]
end

subgraph group_training["Fine-tuning"]
  node_fine_tune["Fine-tuning model wrapper<br/>[model_wrapper.py]"]
  node_collator["CTC data collator<br/>[data_collator.py]"]
end

node_caller(("Audio client"))
node_transcript["Timed phrases"]
node_audio_input(("Audio files or microphone"))
node_browser["Browser UI<br/>[index.html]"]
node_hub[("Hugging Face Hub")]
node_kenlm[("KenLM language model")]
node_triton["Triton inference server"]
node_training_data["Training data"]

node_audio_input -->|"decodes audio"| node_audio_reader
node_audio_reader -->|"yields chunks"| node_pipeline
node_caller -->|"streams chunks"| node_pipeline
node_pipeline -->|"infers log-probs"| node_acoustic_model
node_acoustic_model -->|"encodes features"| node_conformer
node_conformer -->|"applies layers"| node_conformer_blocks
node_conformer_blocks -->|"uses primitives"| node_model_parts
node_pipeline -->|"splits log-probs"| node_splitter
node_pipeline -->|"decodes phrases"| node_decoder
node_decoder -->|"produces text"| node_transcript
node_pipeline -->|"returns timings"| node_transcript
node_web_demo -->|"processes chunks"| node_pipeline
node_browser -->|"streams audio"| node_web_demo
node_web_demo -->|"sends transcripts"| node_browser
node_web_demo -->|"loads model"| node_hub
node_decoder -->|"downloads decoder"| node_hub
node_decoder -->|"scores candidates"| node_kenlm
node_export -->|"exports model"| node_acoustic_model
node_export -->|"uses wrapper"| node_onnx_wrapper
node_triton -->|"loads config"| node_triton_config
node_triton -.->|"loads config"| node_triton_trt_config
node_triton -->|"runs inference"| node_onnx_wrapper
node_fine_tune -->|"wraps model"| node_acoustic_model
node_collator -->|"pads batches"| node_training_data
node_fine_tune -->|"trains with batches"| node_collator

click node_pipeline "https://github.com/voicekit-team/t-one/blob/main/tone/pipeline.py"
click node_splitter "https://github.com/voicekit-team/t-one/blob/main/tone/logprob_splitter.py"
click node_decoder "https://github.com/voicekit-team/t-one/blob/main/tone/decoder.py"
click node_acoustic_model "https://github.com/voicekit-team/t-one/blob/main/tone/nn/model.py"
click node_conformer "https://github.com/voicekit-team/t-one/blob/main/tone/nn/modules/conformer.py"
click node_conformer_blocks "https://github.com/voicekit-team/t-one/blob/main/tone/nn/modules/conformer_blocks.py"
click node_model_parts "https://github.com/voicekit-team/t-one/blob/main/tone/nn/modules/submodules.py"
click node_audio_reader "https://github.com/voicekit-team/t-one/blob/main/tone/demo/read_audio.py"
click node_web_demo "https://github.com/voicekit-team/t-one/blob/main/tone/demo/website.py"
click node_browser "https://github.com/voicekit-team/t-one/blob/main/tone/demo/static/index.html"
click node_export "https://github.com/voicekit-team/t-one/blob/main/tone/scripts/export.py"
click node_onnx_wrapper "https://github.com/voicekit-team/t-one/blob/main/tone/onnx_wrapper.py"
click node_triton_config "https://github.com/voicekit-team/t-one/blob/main/configs/streaming_acoustic/config.pbtxt"
click node_triton_trt_config "https://github.com/voicekit-team/t-one/blob/main/configs/streaming_acoustic_trt/config.pbtxt"
click node_fine_tune "https://github.com/voicekit-team/t-one/blob/main/tone/training/model_wrapper.py"
click node_collator "https://github.com/voicekit-team/t-one/blob/main/tone/training/data_collator.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline,node_splitter,node_decoder,node_caller,node_browser toneBlue
class node_acoustic_model,node_conformer,node_conformer_blocks,node_model_parts,node_hub,node_kenlm toneAmber
class node_audio_reader,node_web_demo,node_export,node_onnx_wrapper,node_triton_config,node_triton_trt_config,node_triton toneMint
class node_fine_tune,node_collator toneRose
class node_transcript,node_audio_input,node_training_data toneIndigo
```

## Components

### Streaming recognition

- [Streaming pipeline](https://github.com/voicekit-team/t-one/blob/main/tone/pipeline.py): `tone/pipeline.py`
- [Phrase splitter](https://github.com/voicekit-team/t-one/blob/main/tone/logprob_splitter.py): `tone/logprob_splitter.py`
- [CTC decoders](https://github.com/voicekit-team/t-one/blob/main/tone/decoder.py): `tone/decoder.py`

### Acoustic model

- [Streaming acoustic model](https://github.com/voicekit-team/t-one/blob/main/tone/nn/model.py): `tone/nn/model.py`
- [Conformer encoder](https://github.com/voicekit-team/t-one/blob/main/tone/nn/modules/conformer.py): `tone/nn/modules/conformer.py`
- [Conformer blocks](https://github.com/voicekit-team/t-one/blob/main/tone/nn/modules/conformer_blocks.py): `tone/nn/modules/conformer_blocks.py`
- [Model submodules](https://github.com/voicekit-team/t-one/blob/main/tone/nn/modules/submodules.py): `tone/nn/modules/submodules.py`

### Serving and export

- [Audio reader](https://github.com/voicekit-team/t-one/blob/main/tone/demo/read_audio.py): `tone/demo/read_audio.py`
- [Browser demo service](https://github.com/voicekit-team/t-one/blob/main/tone/demo/website.py): `tone/demo/website.py`
- [Model export](https://github.com/voicekit-team/t-one/blob/main/tone/scripts/export.py): `tone/scripts/export.py`
- [ONNX wrapper](https://github.com/voicekit-team/t-one/blob/main/tone/onnx_wrapper.py): `tone/onnx_wrapper.py`
- [Triton model configs](https://github.com/voicekit-team/t-one/blob/main/configs/streaming_acoustic/config.pbtxt): `configs/streaming_acoustic/config.pbtxt`
- [TensorRT model config](https://github.com/voicekit-team/t-one/blob/main/configs/streaming_acoustic_trt/config.pbtxt): `configs/streaming_acoustic_trt/config.pbtxt`

### Fine-tuning

- [Fine-tuning model wrapper](https://github.com/voicekit-team/t-one/blob/main/tone/training/model_wrapper.py): `tone/training/model_wrapper.py`
- [CTC data collator](https://github.com/voicekit-team/t-one/blob/main/tone/training/data_collator.py): `tone/training/data_collator.py`

### Other components

- **Audio client**
- **Timed phrases**
- **Audio files or microphone**
- [Browser UI](https://github.com/voicekit-team/t-one/blob/main/tone/demo/static/index.html): `tone/demo/static/index.html`
- **Hugging Face Hub**
- **KenLM language model**
- **Triton inference server**
- **Training data**

## Connections

- Audio files or microphone → Audio reader: decodes audio
- Audio reader → Streaming pipeline: yields chunks
- Audio client → Streaming pipeline: streams chunks
- Streaming pipeline → Streaming acoustic model: infers log-probs
- Streaming acoustic model → Conformer encoder: encodes features
- Conformer encoder → Conformer blocks: applies layers
- Conformer blocks → Model submodules: uses primitives
- Streaming pipeline → Phrase splitter: splits log-probs
- Streaming pipeline → CTC decoders: decodes phrases
- CTC decoders → Timed phrases: produces text
- Streaming pipeline → Timed phrases: returns timings
- Browser demo service → Streaming pipeline: processes chunks
- Browser UI → Browser demo service: streams audio
- Browser demo service → Browser UI: sends transcripts
- Browser demo service → Hugging Face Hub: loads model
- CTC decoders → Hugging Face Hub: downloads decoder
- CTC decoders → KenLM language model: scores candidates
- Model export → Streaming acoustic model: exports model
- Model export → ONNX wrapper: uses wrapper
- Triton inference server → Triton model configs: loads config
- Triton inference server → TensorRT model config: loads config
- Triton inference server → ONNX wrapper: runs inference
- Fine-tuning model wrapper → Streaming acoustic model: wraps model
- CTC data collator → Training data: pads batches
- Fine-tuning model wrapper → CTC data collator: trains with batches
