Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

debug

shixian.shi35ea75e9e564
diff --git a/funasr/datasets/large_datasets/utils/tokenize.py b/funasr/datasets/large_datasets/utils/tokenize.py
index 7fcd0eb39..d87697832 100644
--- a/funasr/datasets/large_datasets/utils/tokenize.py
+++ b/funasr/datasets/large_datasets/utils/tokenize.py
@@ -58,9 +58,10 @@ def tokenize(data,
# enable preset hotword detect in sampling
pre_index = None
for hw in hw_config['pre_hwlist']:
- _find = data['text'][0].find(hw)
+ hw = " ".join(seg_tokenize(hw))
+ _find = text.find(hw)
if _find != -1:
- _find = data['text'][0][:_find].count(" ") # bpe sometimes
+ _find = text[:_find].count(" ") # bpe sometimes
pre_index = [_find, _find + max(hw.count(" "), 1)]
import pdb; pdb.set_trace()
break