使用c-api-demo编译得到decode-file-c-api进行文件读取和热词处理,提示: Cannot find ID for token THE at line: THE. (Hint: words on the same line are separated by spaces)、405 Failed to encode some hotwords, skip them already, see logs above for details.执行命令及结果如下:
./decode-file-c-api --encoder=sherpa-onnx-streaming-zipformer-en-2023-06-26/encoder-epoch-99-avg-1-chunk-16-left-128.int8.onnx \
--decoder=sherpa-onnx-streaming-zipformer-en-2023-06-26/decoder-epoch-99-avg-1-chunk-16-left-128.int8.onnx \
--joiner=sherpa-onnx-streaming-zipformer-en-2023-06-26/joiner-epoch-99-avg-1-chunk-16-left-128.int8.onnx \
--decoding-method=modified_beam_search \
--tokens=sherpa-onnx-streaming-zipformer-en-2023-06-26/tokens.txt \
--modeling-unite=bpe \
--bpe-vocab=sherpa-onnx-streaming-zipformer-en-2023-06-26/bpe.vocab \
--hotwords=sherpa-onnx-streaming-zipformer-en-2023-06-26/hotwords.txt \
test_waves/0.wav
# output
/opt/data/private/restore/root/rensj/PROJECT/ASR/sherpa-onnx-develop/sherpa-onnx/csrc/utils.cc:EncodeBase:64 Cannot find ID for token THE at line: THE. (Hint: words on the same line are separated by spaces)
/opt/data/private/restore/root/rensj/PROJECT/ASR/sherpa-onnx-develop/sherpa-onnx/csrc/online-recognizer-transducer-impl.h:InitHotwords:405 Failed to encode some hotwords, skip them already, see logs above for details.
sample rate: 16000, num samples: 106000, duration: 6.62 s
0: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT
UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS
使用c-api-demo编译得到decode-file-c-api进行文件读取和热词处理,提示: Cannot find ID for token THE at line: THE. (Hint: words on the same line are separated by spaces)、405 Failed to encode some hotwords, skip them already, see logs above for details.执行命令及结果如下: