文章目录
- 移植过程
- 硬件
- 资源下载
- 测试
移植过程
参考我的这篇博客 【RV1126】移植kaldi实时语音识别
硬件
资源下载
链接:https://pan.baidu.com/s/1x1udT5eNzzQHoPOTCQ182A?pwd=lief
提取码:lief
–来自百度网盘超级会员V6的分享
下载的文件里面有一个库(libgomp.so.1),需要拷贝到目标板的/usr/lib
目录下。
测试
# ./sherpa-ncnn-alsa ./tokens.txt ./encoder_jit_trace-pnnx.ncnn.param ./encoder_jit_trace-pnnx.ncnn.bin ./decoder_jit_trace-pnnx.ncnn.param ./decoder_jit_trace-pnnx.ncnn.bin ./joiner_jit_trace-pnnx.ncnn.param ./joiner_jit_trace-pnnx.ncnn.bin "default" 4 greedy_search
RecognizerConfig(feat_config=FeatureExtractorConfig(sampling_rate=16000, feature_dim=80), model_config=ModelConfig(encoder_param="./encoder_jit_trace-pnnx.ncnn.param", encoder_bin="./encoder_jit_trace-pnnx.ncnn.bin", decoder_param="./decoder_jit_trace-pnnx.ncnn.param", decoder_bin="./decoder_jit_trace-pnnx.ncnn.bin", joiner_param="./joiner_jit_trace-pnnx.ncnn.param", joiner_bin="./joiner_jit_trace-pnnx.ncnn.bin", tokens="./tokens.txt", encoder num_threads=4, decoder num_threads=4, joiner num_threads=4), decoder_config=DecoderConfig(method="greedy_search", num_active_paths=4), endpoint_config=EndpointConfig(rule1=EndpointRule(must_contain_nonsilence=False, min_trailing_silence=2.4, min_utterance_length=0), rule2=EndpointRule(must_contain_nonsilence=True, min_trailing_silence=1.2, min_utterance_length=0), rule3=EndpointRule(must_contain_nonsilence=False, min_trailing_silence=0, min_utterance_length=300)), enable_endpoint=True)
Disable fp16 for Zipformer encoder
Don't Use GPU. has_gpu: 0, config.use_vulkan_compute: 1
Current sample rate: 16000
Recording started!
Use recording device: default
0:你好啊
1:晚上好
2: good morning
3: good evening^C
Caught Ctrl + C. Exiting...