compute_det_ctc make_pair drops transcript words that equal the utterance id

Đang mở
#3,978 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@nurlanmnn đang làm issue này rồi.

Từ ngày 29/11/2026.

  • #3979 của @nurlanmnn — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, pytorch
Lĩnh vực
backend, testing-qa

Hướng nghiên cứu

Read funasr/utils/compute_det_ctc.py and inspect make_pair(), which the issue identifies as the source of the transcript truncation. The issue provides two reproductions and the expected text; verify that words matching the utterance ID are retained while parsing the transcript after its first field. The author says a small PR with a test is ready, so check for work already underway before starting.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

make_pair() in funasr/utils/compute_det_ctc.py (used by the fsmn_kws finetune recipe to score keyword spotting) gets the transcript with line.replace(arr[0], '').strip(). That removes every occurrence of the utterance id in the line, not just the id at the start. So if the id also appears inside the transcript, those words are dropped, and the text that decides keyword vs. filler is wrong.

Repro:

from funasr.utils.compute_det_ctc import make_pair

print(make_pair(["1 /a.wav"], ["1 turn on light 1"])[0]["txt"])
print(make_pair(["go /a.wav"], ["go go go forward"])[0]["txt"])

Actual: turn on light and forward
Expected: turn on light 1 and go go forward

Fix: take everything after the first field, e.g. line.strip().split(maxsplit=1)[1].strip(). I have a small PR with a test ready.

Ngôn ngữ chính
Python
Star
21.2k
Fork
2.2k
Merge trung bình
5 giờ 38 phút
Pull request đã merge (30 ngày)
116

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelscope/FunASR

Tất cả issue của modelscope/FunASR

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.