中文断句的老问题,才发现代码调用和命令行方式运行的结果好像是有差别的,不一定适用所有音频文件哈
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
The report compares the funasr command-line run with an AutoModel(...).generate(...) call that uses the ct-punc-c punctuation model, fsmn-vad with max_single_segment_time 60000, and sentence_timestamp/return_time_stamps. Start by diffing the options the CLI sets against those in the Python snippet, then reproduce with the linked mp3 or any local Chinese file. Done means the two paths produce the same segmentation, or the cause is pinned to a specific option. The root cause is not yet identified, so this needs maintainer input.
索引モデルが issue の本文から書いたものです。
説明
funasr --version
funasr 1.4.16
pip show funasr
Name: funasr
Version: 1.4.16
Summary: OpenAI-compatible speech recognition toolkit with WebSocket streaming, vLLM acceleration, and llama.cpp/GGUF edge runtime.
Home-page: https://github.com/modelscope/FunASR
Author: Speech Lab of Alibaba Group
Author-email: [email protected]
License: The MIT License
Location: C:\Program Files\Python312\Lib\site-packages
Requires: huggingface_hub, hydra-core, jaconv, jamo, jieba, kaldiio, librosa, modelscope, numpy, omegaconf, oss2, PyYAML, rapidfuzz, regex, requests, safetensors, scipy, sentencepiece, soundfile, tensorboardX, tiktoken, torch_complex, tqdm, transformers, umap_learn, websockets
发现针对某些音频文件,用cli运行的结果和在py里调用的输出结果不一样,代码方式里出现的不合理断句,在cli中变好了,我只来的及测试了一个文件的某几句,因为刚好是开头部分,我想着不可能是分段喂入导致的问题,结果才发现还有这么一个情况存在。代码和cli都是当初从官网抄来的,项目开发期间可能略有改动,有待进一步证实:
cli:
funasr 胖东来全员双休,不只是员工福利,也是提振内需的一道必答题@微信派@微信视频号创造营_xWT111.mp3 --output-format srt --output-dir ./subs
结果正常了很多:
00:00:00,090 --> 00:00:03,270
朋友们,胖东来又干了一件让全国打工人羡慕的事儿。
代码片断:
kwargs = {"model": args.model, "vad_model": "fsmn-vad",
# "punc_model": "ct-punc",
"punc_model":"ct-punc-c",
"vad_kwargs": {"max_single_segment_time": 60000},
"device": args.device, "disable_update": True}
if args.spk:
kwargs["spk_model"] = "cam++"
if "Fun-ASR-Nano" in args.model or "Qwen" in args.model:
kwargs["trust_remote_code"] = True
kwargs["hub"] = "hf"
model = AutoModel(**kwargs)
... ...
tmp='胖东来全员双休,不只是员工福利,也是提振内需的一道必答题@微信派@微信视频号创造营_xWT111.mp3'
try:
result=model.generate(
input=tmp,
# fs=44100,
batch_size=1,
sentence_timestamp=True,
output_timestamp=True,
return_time_stamps=True,
language='zh',
)
结果不怎么正常:
1 0.09-0.33 180 朋友们,
2 0.51-1.59 120 胖东来又干了一件,
3 1.71-3.27 120 让全国打工人羡慕的事儿,
差点儿忘了测试文件:
http://devv.cc:8999/mp3/胖东来全员双休,不只是员工福利,也是提振内需的一道必答题@微信派@微信视频号创造营_xWT111.mp3
- 主要言語
- Python
- スター
- 20.8k
- フォーク
- 2.1k
- 平均マージ
- 1日 46分
- マージ済み PR(30日)
- 36
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelscope/FunASR のほかの issue
-
compute_wer_by_line raises OverflowError at 32,768 tokens with NumPy 2.3.5対応中かも @carey-bk が 1 日前に担当しました。 オープンbug needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelscope/FunASR#3781 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`SentencepiecesTokenizer.ids2tokens` ignores `token_list` - root cause of the paraformer-en gibberish in #3040対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelscope/FunASR#3780 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelscope/FunASR#3762 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug: blank lines in wav.scp / jsonl file lists crash prepare_data_iterator (IndexError / JSONDecodeError)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンneeds feedback
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
modelscope/FunASR#3757 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
modelscope/FunASR#3730 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
modelscope/FunASR の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
changelog investigate
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
ramnes/notion-sdk-py#423 ·
-
type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信