k2-fsa / sherpa-ncnn

Real-time speech recognition and voice activity detection (VAD) using next-gen Kaldi with ncnn without Internet connection. Support iOS, Android, Linux, macOS, Windows, Raspberry Pi, VisionFive2, LicheePi4A etc.
https://k2-fsa.github.io/sherpa/ncnn/index.html
Apache License 2.0
1.04k stars 156 forks source link

AssertionError #101

Closed xyq001029 closed 1 year ago

xyq001029 commented 1 year ago

AssertionError: ./sherpa-ncnn-conv-emformer-transducer-2022-12-06/tokens.txt does not exist 怎么处理

csukuangfj commented 1 year ago
  1. 请确保你已经下载了这个文件

可以参考 https://k2-fsa.github.io/sherpa/ncnn/pretrained_models/conv-emformer-transducer-models.html#csukuangfj-sherpa-ncnn-conv-emformer-transducer-2022-12-06-chinese-english

  1. 请确保这个路径和你运行的 binary 的关系。即当前路径下有 ./sherpa-ncnn-conv-emformer-transducer-2022-12-06 这个文件夹.
xyq001029 commented 1 year ago

sorry,我是菜鸟。我想请教一下: 我用的是python api去搭建的,然后使用cd /path/to/sherpa-ncnn 后续我改怎么弄

徐逸群 @.***

 

------------------ 原始邮件 ------------------ 发件人: "k2-fsa/sherpa-ncnn" @.>; 发送时间: 2023年2月8日(星期三) 晚上9:23 @.>; @.**@.>; 主题: Re: [k2-fsa/sherpa-ncnn] AssertionError (Issue #101)

请确保你已经下载了这个文件

可以参考 https://k2-fsa.github.io/sherpa/ncnn/pretrained_models/conv-emformer-transducer-models.html#csukuangfj-sherpa-ncnn-conv-emformer-transducer-2022-12-06-chinese-english

请确保这个路径和你运行的 binary 的关系。即当前路径下有 ./sherpa-ncnn-conv-emformer-transducer-2022-12-06 这个文件夹.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

csukuangfj commented 1 year ago
cd /path/to/sherpa-ncnn

GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-ncnn-conv-emformer-transducer-2022-12-06
cd sherpa-ncnn-conv-emformer-transducer-2022-12-06
git lfs pull --include "*.bin"

cd ..

python3 ./python-api-examples/decode-file.py

python3 ./python-api-examples/speech-recognition-from-microphone-with-endpoint-detection.py

python3 ./python-api-examples/speech-recognition-from-microphone.py

注意,你可能需要安装

sudo apt-get install git-lfs
xyq001029 commented 1 year ago

git-lfs我已经装好了,我在pre-trianed model下载那一步卡壳了。 如果不能找到位置 那我该咋办

 

徐逸群 @.***

 

------------------ 原始邮件 ------------------ 发件人: "Fangjun @.>; 发送时间: 2023年2月8日(星期三) 晚上9:38 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [k2-fsa/sherpa-ncnn] AssertionError (Issue #101)

cd /path/to/sherpa-ncnn GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-ncnn-conv-emformer-transducer-2022-12-06 cd sherpa-ncnn-conv-emformer-transducer-2022-12-06 git lfs pull --include "*.bin" cd .. python3 ./python-api-examples/decode-file.py python3 ./python-api-examples/speech-recognition-from-microphone-with-endpoint-detection.py python3 ./python-api-examples/speech-recognition-from-microphone.py

注意,你可能需要安装 sudo apt-get install git-lfs

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

csukuangfj commented 1 year ago

我在pre-trianed model下载那一步卡壳了

卡壳了,是什么意思?

git clone https://github.com/k2-fsa/sherpa-ncnn
cd sherpa-ncnn
# 注意,我们把 pre-trained models 就放在这个文件夹下

GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-ncnn-conv-emformer-transducer-2022-12-06
cd sherpa-ncnn-conv-emformer-transducer-2022-12-06
git lfs pull --include "*.bin"

cd ..

python3 ./python-api-examples/decode-file.py

python3 ./python-api-examples/speech-recognition-from-microphone-with-endpoint-detection.py

python3 ./python-api-examples/speech-recognition-from-microphone.py

你照我上面的命令做,就可以了

csukuangfj commented 1 year ago

假设你当前在 /tmp 目录下

cd /tmp

git clone https://github.com/k2-fsa/sherpa-ncnn
cd sherpa-ncnn
# 注意,我们把 pre-trained models 就放在这个文件夹下

GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-ncnn-conv-emformer-transducer-2022-12-06
cd sherpa-ncnn-conv-emformer-transducer-2022-12-06

上面的命令,把 pre-trained models 放在

/tmp/sherpa-ncnn/sherpa-ncnn-conv-emformer-transducer-2022-12-06
csukuangfj commented 1 year ago

@xyq001029 解决了吗?

xyq001029 commented 1 year ago

谢谢!!! 解决了  

徐逸群 @.***

 

------------------ 原始邮件 ------------------ 发件人: "Fangjun @.>; 发送时间: 2023年2月9日(星期四) 中午11:19 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [k2-fsa/sherpa-ncnn] AssertionError (Issue #101)

@xyq001029 解决了吗?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>