wanglamao commited on
Commit
b4413de
Β·
verified Β·
1 Parent(s): ed50ac2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -116
README.md CHANGED
@@ -16,41 +16,32 @@ tags:
16
 
17
  # Audio8 ASR Infinite
18
 
19
- **A low-latency streaming speech recognition model with unlimited-length transcription, a selectable 80/120/160 ms audio clock, and a per-session transcription delay. Chinese and English.**
20
-
21
  [![GitHub](https://img.shields.io/badge/GitHub-Audio8--ASR--Infinite-black?style=for-the-badge&logo=github)](https://github.com/Edge0-AI/Audio8-ASR-Infinite)
 
22
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue?style=for-the-badge)](https://github.com/Edge0-AI/Audio8-ASR-Infinite/blob/main/LICENSE)
23
 
24
  </div>
25
 
26
- **Audio8 ASR Infinite** is a low-latency streaming speech recognition model that
27
- emits one text token per selectable 80/120/160 ms clock step, transcribes audio
28
- of unlimited length without drifting, and supports Chinese and English with a
29
- per-session transcription delay (`target_delay_ms`).
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
- - **Unlimited-length transcription** β€” a self-managed 30 s rolling KV window
43
- (with exact RoPE re-basing) keeps memory and latency bounded regardless of
44
- audio duration; validated end-to-end on 10-minute continuous streams with
45
- zero transcription drift.
46
- - **Selectable 80/120/160 ms streaming clock** β€” text tokens are emitted one per
47
- clock step (12.5 / 8.3 / 6.25 decisions per second), trading perception
48
- granularity for compute; partial results stream out in real time.
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
- ## Supported operation points
 
 
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 | single 8.17 GB `model.safetensors` |
75
 
76
- ## Inference paths
77
 
78
- This repository holds **weights only**. The two inference paths live in the
79
- GitHub repository:
 
80
 
81
- | Path | Entry point | Notes |
82
  | --- | --- | --- |
83
- | torch (simulated streaming) | `audio8_asr_infinite/streaming_inference.py` | Definition-aligned simulated-streaming greedy decode: per-window feature extraction with a streaming audio/language KV cache; evaluation behavior matches deployment |
84
- | vLLM (real streaming service) | `audio8_asr_infinite/vllm_serve/` | Official vLLM 0.27.1 plugin points (zero patches, no site-packages overwrite); `/v1/realtime` WebSocket service + 30 s rolling KV |
85
 
86
- ## Installation
87
 
88
- Version requirements: `transformers==5.13.0` (must include
89
- `models.voxtral_realtime`), `torch 2.13`, Python 3.11/3.12. The vLLM path also
90
- needs `vllm==0.27.1`.
 
 
 
 
 
 
 
 
 
 
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
- Real streaming service β€” docker compose is the canonical deployment path (it
147
- also serves the web demo):
 
148
 
149
  ```bash
150
  cd docker
151
- AUDIO8_MODEL_DIR=/path/to/merged-v2-checkpoint docker compose up -d
152
  ```
153
 
154
- Verify with real audio using the bundled client:
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
- `docker/docker-compose.yml` in the repository is the deployment source of
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
- ## Repository layout
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
- | Stage | Scope |
226
- | --- | --- |
227
- | **Preview β€” ASR base (this checkpoint)** | Streaming Chinese/English transcription: selectable 80/120/160 ms clock, per-session `target_delay_ms`, unlimited-length rolling KV window |
228
- | **Formal release (in progress)** | Frame-level semantic perception on the same grid, beyond transcription: semantic VAD, voice commands, multi-speaker handling |
229
 
230
- Nothing beyond transcription is claimed for this checkpoint.
231
 
232
- ## License
 
 
 
 
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
+ [![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Audio8--ASR--Infinite-yellow?style=for-the-badge)](https://huggingface.co/Edge0/Audio8-ASR-Infinite)
 
20
  [![GitHub](https://img.shields.io/badge/GitHub-Audio8--ASR--Infinite-black?style=for-the-badge&logo=github)](https://github.com/Edge0-AI/Audio8-ASR-Infinite)
21
+ [![arXiv](https://img.shields.io/badge/arXiv-coming%20soon-b31b1b?style=for-the-badge&logo=arxiv&logoColor=white)](https://github.com/Edge0-AI/Audio8-ASR-Infinite)
22
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue?style=for-the-badge)](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