离线语音控制

1 分类

从线上线下角度划分,也就是是否需要互联网,分为线上识别和离线识别;从软件实现和硬件实现角度划分的话,有现成的产品(网上一搜一大堆),有现成的模组(同样一搜一大堆),还有各大厂、各团队发布的 SDK 或相关的语音项目(仍然一搜一大堆)。

2 离线开源语音项目的选择

本人搞了一个 dragoncar (就是一个wifi 控制的小车),想添加语音控制的功能,为什么要添加这个功能呢,就是”玩呗”。

为什么要使用离线语音控制?个人觉得,他们的数据可以尽可能地保存在自己的家里。

[En]

Why use offline voice control? Individuals feel that their data can be kept in their own home as much as possible.

为什么要使用开源语音项目进行语音控制?一个是成本,另一个是可伸缩性。

[En]

Why use open source voice projects for voice control? One is cost, the other is scalability.

那么,众多线下开源语音项目应该选择哪一个呢?有几个维度,需要有大的工厂维护或推荐,项目文件不能写得太差,网上海量基础,安装使用方便,系统消耗低,准确率高,延迟低。谈了很久,该如何选择呢?一种方式,这么多个项目,一个接一个地尝试,然后使用感觉好的一个。说了很多,这不是胡说八道,没有办法,因为没有完美的东西,而且每个人的倾向也是不同的,所以只能靠自己的感受。

[En]

So, which one should be chosen for many offline open-source voice projects? Several dimensions, need to have large factory maintenance or recommendation, project documents can not be too poorly written, online mass base, easy to install and use, low system consumption, high accuracy, low delay. After a lot of talk, how to choose? One way, so many projects, try one by one, and use which one feels good. Said a lot, this is not nonsense, there is no way, because there is no perfect thing, and everyone’s tendency is also different, so can only rely on their own feelings.

本人选择的项目是 vosk-api ,优点是支持中文,准确率高;缺点就是 pi 4 上面使用有差不多 3s 的延迟。

项目名称:vosk-api
vosk 项目链接:https://github.com/alphacep/vosk-api
vosk 项目文档:https://alphacephei.com/vosk/
预训练模型:https://alphacephei.com/vosk/models

3 vosk 的安装使用

安装使用方面,项目文档写的很详细,在此简单介绍一下 python3 下的安装使用。

安装:

pip3 install vosk

使用:

git clone https://github.com/alphacep/vosk-api.git
cd vosk-api/python/example
wget -c https://alphacephei.com/vosk/models/vosk-model-small-cn-0.3.zip
unzip vosk-model-small-cn-0.3.zip
mv vosk-model-small-cn-0.3 model
python3 ./test_simple.py test.wav

注意:测试的音频文件要使用 16khz 的文件;根据不同的语言选择不同的语言模型

Original: https://blog.csdn.net/bibo1984/article/details/110108886
Author: bibo1984
Title: 离线语音控制

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/526052/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球