源码编译 FunASR for windows on arm

源码编译 FunASR for windows on arm

这里有编译好的,直接下载使用

https://github.com/turingevo/FunASR-build/releases

编译

configure 、generate 用vsual studio 打开,编译

生成文件在这里:C:\workspace\FunASR\runtime\websocket\build\bin\Release

使用

1 下载模型:

在modelscope : https://www.modelscope.cn/models

直接搜索模型名称,然后下载,放在路径下C:\workspace\models\

复制代码
iic/speech_fsmn_vad_zh-cn-16k-common-onnx 
iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch  
iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx
iic/punc_ct-transformer_cn-en-common-vocab471067-large-onnx 
iic/speech_ngram_lm_zh-cn-ai-wesp-fst 
thuduj12/fst_itn_zh 
2 下载测试音频:

https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav

3 启用server:

在FunASR/runtime/ 路径下,新建 run_server.bat 文件:

powershell 复制代码
@echo off
:: Start the command directly
"C:\workspace\FunASR\runtime\websocket\build\bin\Release\funasr-wss-server.exe" ^
    --download-model-dir "C:\workspace\models" ^
    --model-dir "C:\workspace\models\speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx"
    --itn-dir "C:\workspace\models\fst_itn_zh" ^
    --lm-dir "C:\workspace\models\speech_ngram_lm_zh-cn-ai-wesp-fst" ^
    --decoder-thread-num 4 ^
    --model-thread-num 4 ^
    --io-thread-num 4 ^
    --port 10095 ^
    --certfile "C:\workspace\FunASR\runtime\ssl_key\server.crt" ^
    --keyfile "C:\workspace\FunASR\runtime\ssl_key\server.key" ^
	--hotword "C:\workspace\FunASR\runtime\websocket\hotwords.txt"
4 运行client:

在FunASR/runtime/ 路径下打开cmd,输入:

powershell 复制代码
websocket/build/bin/funasr-wss-client --server-ip 127.0.0.1 --port 10095 --wav-path asr_example_zh.wav

输出:

bash 复制代码
{"is_final":false,"mode":"offline","stamp_sents":[{"end":5195,"punc":"。","start":880,"text_seg":"欢 迎 大 家 来 体 验 达 摩 院 推 出 的 语 音 识 别 模 型","ts_list":[[880,1120],[1120,1380],[1380,1540],[1540,1780],[1780,2020],[2020,2180],[2180,2480],[2480,2600],[2600,2780],[2780,3040],[3040,3240],[3240,3480],[3480,3699],[3699,3900],[3900,4180],[4180,4420],[4420,4620],[4620,4780],[4780,5195]]}],"text":"欢迎大家来体验达摩院推出的语音识别模型。","timestamp":"[[880,1120],[1120,1380],[1380,1540],[1540,1780],[1780,2020],[2020,2180],[2180,2480],[2480,2600],[2600,2780],[2780,3040],[3040,3240],[3240,3480],[3480,3699],[3699,3900],[3900,4180],[4180,4420],[4420,4620],[4620,4780],[4780,5195]]","wav_name":"wav_default_id"}

提取其中的text字段的值,就是解码结果
"欢迎大家来体验达摩院推出的语音识别模型。"

相关推荐
Abigail_chow7 小时前
EXCEL如何快速批量给两字姓名中间加空格
windows·microsoft·excel·学习方法·政务
love530love8 小时前
【笔记】在 MSYS2(MINGW64)中正确安装 Rust
运维·开发语言·人工智能·windows·笔记·python·rust
代码搬运媛10 小时前
“packageManager“: “[email protected]“ 配置如何正确启动项目?
windows·webpack
小道士写程序11 小时前
Qt 5.12 上读取 .xlsx 文件(Windows 平台)
开发语言·windows·qt
Blossom.11812 小时前
量子通信:从科幻走向现实的未来通信技术
人工智能·深度学习·目标检测·机器学习·计算机视觉·语音识别·量子计算
异常君16 小时前
Windows 与 Linux 虚拟内存机制对比:设计理念与实现差异
java·linux·windows
搏博18 小时前
将图形可视化工具的 Python 脚本打包为 Windows 应用程序
开发语言·windows·python·matplotlib·数据可视化
电手19 小时前
Win10停更,Win11不好用?现在Mac电脑比Win11电脑更便宜
windows·macos·电脑·mac
拾回程序猿的圈圈∞19 小时前
PyCharm项目和文件运行时使用conda环境的教程
windows·pycharm·conda
波点兔19 小时前
【亲测有效 | Cursor Pro每月500次快速请求扩5倍】(Windows版)Cursor中集成interactive-feedback-mcp
windows·mcp·cursor pro