Automatic Speech Recognition
Transformers
Safetensors
Chinese
English
audio8_asr_infinite
text-generation
streaming
realtime
speech-recognition
audio
custom_code
Instructions to use Edge0/Audio8-ASR-Infinite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Edge0/Audio8-ASR-Infinite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="Edge0/Audio8-ASR-Infinite", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Edge0/Audio8-ASR-Infinite", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,41 +16,32 @@ tags:
|
|
| 16 |
|
| 17 |
# Audio8 ASR Infinite
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
[](https://github.com/Edge0-AI/Audio8-ASR-Infinite)
|
|
|
|
| 22 |
[](https://github.com/Edge0-AI/Audio8-ASR-Infinite/blob/main/LICENSE)
|
| 23 |
|
| 24 |
</div>
|
| 25 |
|
| 26 |
-
**Audio8 ASR Infinite** is a
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
## TL;DR
|
| 32 |
-
|
| 33 |
-
- **Low-latency streaming ASR** β text streams out one token per selectable
|
| 34 |
-
80/120/160 ms clock step.
|
| 35 |
-
- **Unlimited-length transcription** β a 30 s rolling KV window keeps memory and
|
| 36 |
-
latency bounded no matter how long the audio runs.
|
| 37 |
-
- **Deployable as-is** β merged checkpoint with embedded remote code,
|
| 38 |
-
per-session `target_delay_ms`, Chinese and English.
|
| 39 |
|
| 40 |
## Highlights
|
| 41 |
|
| 42 |
-
- **
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
- **Configurable transcription delay** β pick the latency/quality trade-off at
|
| 50 |
-
session start (`target_delay_ms`), per session.
|
| 51 |
- **Bilingual** β Chinese and English.
|
| 52 |
|
| 53 |
-
##
|
|
|
|
|
|
|
| 54 |
|
| 55 |
| audio clock | `frame_len` | `streaming_n_left_pad_tokens` | selectable `target_delay_ms` |
|
| 56 |
| --- | --- | --- | --- |
|
|
@@ -63,36 +54,56 @@ delays stay available at every clock even when they are not listed above.
|
|
| 63 |
|
| 64 |
## Architecture
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
| | |
|
| 67 |
| --- | --- |
|
| 68 |
| audio tower | 32 layers, hidden 1280, 128 mel bins, sliding window 750 |
|
| 69 |
| text decoder | 36 layers, hidden 2048, 16 query heads / 2 KV heads |
|
| 70 |
| projector | max frame len 8 β projection size 10240, gelu |
|
| 71 |
| frame-length conditioning | enabled (`use_frame_len_embedding: true`) |
|
|
|
|
| 72 |
| vocab size | 151936 |
|
| 73 |
| dtype | bfloat16 |
|
| 74 |
-
| weights |
|
| 75 |
|
| 76 |
-
##
|
| 77 |
|
| 78 |
-
This
|
| 79 |
-
|
|
|
|
| 80 |
|
| 81 |
-
|
|
| 82 |
| --- | --- | --- |
|
| 83 |
-
|
|
| 84 |
-
|
|
| 85 |
|
| 86 |
-
##
|
| 87 |
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
-
```bash
|
| 93 |
-
pip install -e . # torch path
|
| 94 |
-
pip install -e ".[vllm]" # vllm==0.27.1 + pybase64
|
| 95 |
-
```
|
| 96 |
|
| 97 |
## Usage
|
| 98 |
|
|
@@ -143,94 +154,40 @@ print(results[0]["final_text"])
|
|
| 143 |
Only a full merged weight directory is supported (this repository as-is);
|
| 144 |
adapter-style or partially converted weights are not.
|
| 145 |
|
| 146 |
-
|
| 147 |
-
|
|
|
|
| 148 |
|
| 149 |
```bash
|
| 150 |
cd docker
|
| 151 |
-
AUDIO8_MODEL_DIR=/path/to/
|
| 152 |
```
|
| 153 |
|
| 154 |
-
Verify with
|
| 155 |
|
| 156 |
-
```bash
|
| 157 |
-
python -m audio8_asr_infinite.examples.vllm_realtime_client \
|
| 158 |
-
--audio sample.wav --ws-url ws://127.0.0.1:18190/v1/realtime \
|
| 159 |
-
--language zh --target-delay-ms 480 --pace
|
| 160 |
```
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
truth: GPU and port selection, the three plugin-injection switches
|
| 164 |
-
(`PYTHONPATH` + `VLLM_PLUGINS` + `--scheduler-cls`), health checks, and the
|
| 165 |
-
startup log markers that prove the plugins loaded.
|
| 166 |
-
|
| 167 |
-
## Decoding note β EOS is suppressed unconditionally
|
| 168 |
-
|
| 169 |
-
This checkpoint was trained **without EOS supervision**: after speech ends, every
|
| 170 |
-
frame is labelled `[STREAMING_PAD]`, so when to stop is decided by the timeline
|
| 171 |
-
length rather than by the model. The released decoder therefore masks the EOS
|
| 172 |
-
logit at every step, and that behaviour is not configurable.
|
| 173 |
-
|
| 174 |
-
Do not pair this checkpoint with a decoder that stops on EOS: re-enabling EOS
|
| 175 |
-
decoding throws away the property this checkpoint was trained for. Conversely,
|
| 176 |
-
this checkpoint β not an EOS-trained one β is the one that expects hard EOS
|
| 177 |
-
suppression.
|
| 178 |
-
|
| 179 |
-
## Evaluation
|
| 180 |
-
|
| 181 |
-
Greedy decode with EOS suppressed, at the 80 ms audio clock with
|
| 182 |
-
`target_delay_ms = 480` (6 delay tokens).
|
| 183 |
-
|
| 184 |
-
| test set | rows | metric | score |
|
| 185 |
-
| --- | --- | --- | --- |
|
| 186 |
-
| aishell1/test | 7176 | CER | **1.75** |
|
| 187 |
-
| librispeech test.clean | 2620 | WER | **3.04** |
|
| 188 |
-
| librispeech test.other | 2939 | WER | **6.81** |
|
| 189 |
-
|
| 190 |
-
Error rates in percent. No repetition loops and no dropped trailing words.
|
| 191 |
-
|
| 192 |
-
## Files
|
| 193 |
-
|
| 194 |
-
```
|
| 195 |
-
config.json config + auto_map remote code
|
| 196 |
-
configuration_audio8_asr_infinite.py remote code: config class
|
| 197 |
-
modeling_audio8_asr_infinite.py remote code: model class
|
| 198 |
-
model.safetensors 8.17 GB, bf16, single file
|
| 199 |
-
generation_config.json
|
| 200 |
-
preprocessor_config.json 16 kHz, 128 mel bins
|
| 201 |
-
tokenizer.json / tokenizer_config.json / chat_template.jinja
|
| 202 |
```
|
| 203 |
|
| 204 |
-
|
| 205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
```
|
| 207 |
-
audio8_asr_infinite/
|
| 208 |
-
βββ modeling/ # HF-style config + modeling (Audio8ASRInfinite*)
|
| 209 |
-
βββ streaming_inference.py # torch simulated-streaming decode (canonical inference entry)
|
| 210 |
-
βββ simulated_streaming_audio.py # shared audio-window / streaming-KV helpers
|
| 211 |
-
βββ vllm_serve/ # vLLM 0.27.1 plugins (model adapter + rolling scheduler + realtime endpoint)
|
| 212 |
-
βββ examples/ # torch decode example + vLLM WebSocket client
|
| 213 |
-
βββ client/ # browser realtime transcription demo (static)
|
| 214 |
-
βββ docker/ # Dockerfile / docker-compose / TLS proxy
|
| 215 |
-
βββ hf_demo/ # HuggingFace Spaces Gradio demo
|
| 216 |
-
```
|
| 217 |
-
|
| 218 |
-
## Roadmap
|
| 219 |
-
|
| 220 |
-
This is the **preview checkpoint**, and it delivers the transcription base.
|
| 221 |
-
Realtime semantic perception is being built on the same frame grid and the same
|
| 222 |
-
acoustic forward pass, so the formal release extends this stack rather than
|
| 223 |
-
replacing it.
|
| 224 |
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
|
| 230 |
-
|
| 231 |
|
| 232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
|
| 234 |
-
Apache-2.0. The vendored vLLM realtime files under
|
| 235 |
-
`vllm_serve/vllm0271/realtime/` keep their upstream Apache-2.0 copyright
|
| 236 |
-
headers; the licenses are compatible.
|
|
|
|
| 16 |
|
| 17 |
# Audio8 ASR Infinite
|
| 18 |
|
| 19 |
+
[](https://huggingface.co/Edge0/Audio8-ASR-Infinite)
|
|
|
|
| 20 |
[](https://github.com/Edge0-AI/Audio8-ASR-Infinite)
|
| 21 |
+
[](https://github.com/Edge0-AI/Audio8-ASR-Infinite)
|
| 22 |
[](https://github.com/Edge0-AI/Audio8-ASR-Infinite/blob/main/LICENSE)
|
| 23 |
|
| 24 |
</div>
|
| 25 |
|
| 26 |
+
**Audio8 ASR Infinite** is a native streaming speech recognition model built to be
|
| 27 |
+
as responsive as possible. It offers a selectable audio clock (80/120/160 ms) and
|
| 28 |
+
a transcription delay (240β560 ms).
|
| 29 |
+
With our adapted vLLM build it transcribes unlimited-length audio **24/7** without drifting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
## Highlights
|
| 32 |
|
| 33 |
+
- **Super responsive** β the native streaming architecture decodes 12.5 times per second.
|
| 34 |
+
- **Unlimited-length transcription** β a rolling KV cache keeps memory and
|
| 35 |
+
latency bounded, even in **24/7 operation**.
|
| 36 |
+
- **Selectable streaming clock** β one text token per clock step
|
| 37 |
+
(12.5 / 8.3 / 6.25 decisions per second), balancing perception granularity and resource cost.
|
| 38 |
+
- **Configurable transcription delay** β set how much delay to trade for accuracy.
|
| 39 |
+
- **Semantic VAD** β distinguishes thinking pauses, stuttering and real end of turn, where traditional acoustic VAD fails.
|
|
|
|
|
|
|
| 40 |
- **Bilingual** β Chinese and English.
|
| 41 |
|
| 42 |
+
## Optimized operation points
|
| 43 |
+
|
| 44 |
+
The following combinations of frame length and delay are post-trained. Other combinations can be used but performance may not be optimum.
|
| 45 |
|
| 46 |
| audio clock | `frame_len` | `streaming_n_left_pad_tokens` | selectable `target_delay_ms` |
|
| 47 |
| --- | --- | --- | --- |
|
|
|
|
| 54 |
|
| 55 |
## Architecture
|
| 56 |
|
| 57 |
+
Inherits the Voxtral realtime audio architecture and DSM-style streaming.
|
| 58 |
+
|
| 59 |
+
| Component | Initial weights | Trained |
|
| 60 |
+
| --- | --- | --- |
|
| 61 |
+
| Causal Audio Tower | Voxtral Realtime 4B | β
|
|
| 62 |
+
| Audio Projector | random initialisation | β
|
|
| 63 |
+
| Frame Length Embedding | random initialisation | β
|
|
| 64 |
+
| Decoder | Qwen2.5-3B-Instruct | β
|
|
| 65 |
+
| LM Head | Qwen2.5-3B-Instruct | β
|
|
| 66 |
+
|
| 67 |
+
Checkpoint specification:
|
| 68 |
+
|
| 69 |
| | |
|
| 70 |
| --- | --- |
|
| 71 |
| audio tower | 32 layers, hidden 1280, 128 mel bins, sliding window 750 |
|
| 72 |
| text decoder | 36 layers, hidden 2048, 16 query heads / 2 KV heads |
|
| 73 |
| projector | max frame len 8 β projection size 10240, gelu |
|
| 74 |
| frame-length conditioning | enabled (`use_frame_len_embedding: true`) |
|
| 75 |
+
| semantic VAD heads | `semantic_vad_heads.safetensors`, 8 classes, horizons 0.5 / 1.0 / 2.0 / 3.0 s |
|
| 76 |
| vocab size | 151936 |
|
| 77 |
| dtype | bfloat16 |
|
| 78 |
+
| weights | 8.17 GB `model.safetensors` (+ `semantic_vad_heads.safetensors`) |
|
| 79 |
|
| 80 |
+
## Roadmap
|
| 81 |
|
| 82 |
+
This is the **preview release**: it delivers the transcription base. Realtime
|
| 83 |
+
semantic perception is being built on the same frame grid and the same acoustic
|
| 84 |
+
forward pass.
|
| 85 |
|
| 86 |
+
| Stage | Status | Scope |
|
| 87 |
| --- | --- | --- |
|
| 88 |
+
| **Preview β ASR base** | β
done | Streaming Chinese/English transcription: selectable 80/120/160 ms clock, configurable `target_delay_ms`, unlimited-length rolling KV window |
|
| 89 |
+
| **Formal release** | πin progress | Frame-level semantic perception on the same grid, beyond transcription |
|
| 90 |
|
| 91 |
+
## Evaluation
|
| 92 |
|
| 93 |
+
### 480 ms Delay, 80ms frame length
|
| 94 |
+
|
| 95 |
+
| test set | metric | Audio8 ASR Infinite | Voxtral-Mini-4B-Realtime-2602 | nemotron-3.5-asr-streaming-0.6b |
|
| 96 |
+
| --- | --- | --- | --- | --- |
|
| 97 |
+
| aishell1/test | CER | **1.750** | 16.795 | 12.927@560ms |
|
| 98 |
+
| aishell4/test | CER | **2.893** | 16.456 | 14.677@560ms |
|
| 99 |
+
| librispeech test.clean | WER | 3.042 | **2.210** | 3.353@560ms |
|
| 100 |
+
| librispeech test.other | WER | 6.808 | **5.552** | 7.140@560ms |
|
| 101 |
+
| **average** | | **3.623** | 10.253 (2 sets) | 9.524 |
|
| 102 |
+
|
| 103 |
+
Greedy decode with EOS suppressed, at the 80 ms audio clock with
|
| 104 |
+
`target_delay_ms = 480` (6 delay tokens). Error rates in percent. No repetition
|
| 105 |
+
loops and no dropped trailing words.
|
| 106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
## Usage
|
| 109 |
|
|
|
|
| 154 |
Only a full merged weight directory is supported (this repository as-is);
|
| 155 |
adapter-style or partially converted weights are not.
|
| 156 |
|
| 157 |
+
## 24/7 inference with vLLM
|
| 158 |
+
|
| 159 |
+
Docker compose is the canonical deployment path; it also serves the web demo:
|
| 160 |
|
| 161 |
```bash
|
| 162 |
cd docker
|
| 163 |
+
AUDIO8_MODEL_DIR=/path/to/checkpoint docker compose up -d
|
| 164 |
```
|
| 165 |
|
| 166 |
+
Verify with the web client shipped in the same stack:
|
| 167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
```
|
| 169 |
+
http://localhost:8080/ # plain HTTP
|
| 170 |
+
https://localhost:8443/ # TLS proxy; accept the self-signed certificate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
```
|
| 172 |
|
| 173 |
+
The same socket can be driven from a terminal:
|
| 174 |
|
| 175 |
+
```bash
|
| 176 |
+
python -m audio8_asr_infinite.examples.vllm_realtime_client \
|
| 177 |
+
--ws-url ws://127.0.0.1:18191/v1/realtime \
|
| 178 |
+
--audio sample.wav --language zh --target-delay-ms 480 --pace
|
| 179 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
|
| 181 |
+
`18191` is the host port published by `docker/docker-compose.yml`; the service
|
| 182 |
+
itself listens on `18190` inside the compose network. The rolling KV window is
|
| 183 |
+
30 s with exact RoPE re-basing, which is what keeps memory and latency bounded
|
| 184 |
+
over 24/7 operation.
|
| 185 |
|
| 186 |
+
## Torch inference (simulated streaming decode)
|
| 187 |
|
| 188 |
+
```bash
|
| 189 |
+
python -m audio8_asr_infinite.examples.torch_streaming_decode \
|
| 190 |
+
--checkpoint /path/to/checkpoint \
|
| 191 |
+
--audio sample.wav --language zh --transcription-delay-ms 480
|
| 192 |
+
```
|
| 193 |
|
|
|
|
|
|
|
|
|