Moonshine streaming: zero-audio frontend context at the utterance start corrupts transcripts
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- c
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Read moonshine_stream_jni.c, focusing on the first-window and early-peek frontend handling at start == 0. Compare the current zero-audio context path with the issue's proposed sample-0 input and first-CHUNK-frames behavior. Validate against the three beckett.wav slices and confirm their transcripts match the stated references; note that pull request #501 is already open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
moonshine_stream_jni.c feeds the frontend of the first encoder window four frames (FE_LC) of zero samples as left context. Zero samples are not the absence of context: past the first convolution's bias they become non-zero features, where the reference model zero-pads. The first memory rows come out wrong, and through the encoder's attention the error spreads over the whole utterance. Clips that start with a short pause before speech lose their entire transcript.
Repro
Moonshine v2 streaming tiny (EN, moonshine-ai/moonshine-streaming-tiny @ f8e9dfd), the five graphs from the asr-moonshine-v2-streaming-iree blueprint, 4 s slices of the public Moonshine sample beckett.wav:
| clip | reference (transformers 5.20.1, full pass) | streaming runtime today |
|---|---|---|
| beckett 0–4 s | Ever tried, ever failed, no matter. | Ever tried, ever failed. |
| beckett 2.6–6.6 s | Old. No matter. Try again. | No, no, 10 out. |
| beckett 5.6–9.6 s (1.1 s pause, then speech) | Fail again, fail better. | (empty) |
Bisection
- Each graph (frontend, encoder, adapter, prefill incl. logits) agrees with the same graph on host IREE 3.11 (cos 1.000000), so compiler and runtime are not involved.
- The PyTorch decoder fed the cross memory built the way the runtime builds it reproduces the wrong transcripts exactly, so the decode loop is faithful and the memory is wrong.
- The memory's first rows have cos 0.15–0.6 against the reference encoder output, recovering only after ~30 frames.
- A PyTorch emulation of the streaming loop reproduces the runtime's output word for word. Changing only the utterance start (no frontend context instead of zero audio) fixes all three clips. (Separately, the exported encoder's attention bands are one frame wider on each side than the reference,
dist <= 16/<= 4vs< 16/< 4. That alone is harmless: the reference with the wider bands still decodes all three correctly.)
Fix
At start == 0 (the first window and the early peek), feed the frontend from sample 0 and keep its first CHUNK output frames instead of feats[FE_LC]. The graph's own convolution padding is then exactly the reference start. Later windows are unchanged (their 4 frames of real context cover the frontend's receptive field; they match the reference exactly).
Verified with the same change in a port of this runtime on a Cortex-A55 board (local-task): all three finals match the reference.
- Ngôn ngữ chính
- Kotlin
- Star
- 8
- Fork
- 3
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 48
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SKaiNET-developers/SKaiNET-transformers
-
documentation good first issue size:xs skill:docs sub-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SKaiNET-developers/SKaiNET-transformers#478 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement skill:kotlin-core
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
SKaiNET-developers/SKaiNET-transformers#502 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
SKaiNET-developers/SKaiNET-transformers#483 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
coding good first issue size:s skill:kotlin-core sub-issue
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 64/100
SKaiNET-developers/SKaiNET-transformers#477 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
coding good first issue size:s skill:numerics sub-issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
SKaiNET-developers/SKaiNET-transformers#476 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SKaiNET-developers/SKaiNET-transformers
Issue tương tự
-
android bug kotlin vulkan
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
maplibre/maplibre-native-ffi#852 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation importer size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
enorm-labs/event-junkie#3614 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
InsertKoinIO/koin#2477 ·
-
[Submission] AI服务引擎Đang mởsubmit-adaption submit-adaption-pre
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
BetterAndroid/android-notification-icon-project#783 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày