一个高性能,易于扩展且完全开源的自然交互系统
演示视频(BiliBili): https://www.bilibili.com/video/av54654613
功能
- 离线唤醒
- 基于开源轻量级语音识别引擎PocketSphinx实现
- 使用开源工具集CMUCLMTK进行离线语言模型训练
- 在线语音识别
- 调用百度在线语音识别API
- 语音合成:
- 调用百度在线语音合成API
- 自然语言理解
- 基于开源自然语言理解框架Rasa NLU实现
- 采用开源信息提取工具集MITIE构建用于Rasa NLU进行实体识别和意图识别的模型
- 意图识别分类采用开源机器学习框架scikit-learn
- 中文分词采用开源分词组件jieba
- 情感分析
- 基于支持向量机(SVM)算法进行情感极性分析
- word2vec模型构建采用开源主题建模工具Gensim
- (可选)基于逻辑回归(Logistic Regression)算法的情感极性分类器实现
目录
安装和配置请阅读文档: https://homo.codist.me/docs/install/
进入nlu
的文件夹,source
对应的python虚拟环境并启动http服务器:
cd nlu
source env3.6/bin/activate
python -m rasa_nlu.server \
-c configs/rasa/config_jieba_mitie_sklearn.yml \
--path models
或者直接运行脚本nlu_server.sh
:
cd nlu
./nlu_server.sh
进入sentiment
文件夹,source
对应的python虚拟环境并启动http服务器:
cd sentiment
source env3.6/bin/activate
python server.py
或直接运行脚本:
cd sentiment
./server.sh
注意:加载word2vec模型需要花费5~7分钟时间
./homo-webview
了解详细启动参数请阅读文档
自定义唤醒Homo时的唤醒词
参考文档:https://homo.codist.me/docs/wake-up/
cmd
:用户交互部分,Golang实现interact
:控制台UI实现(已停止维护)webview
:webview UI实现
module
:主体架构各模块,Golang实现audio
:底层音频硬件交互baidu
:baidu在线语音识别&合成API交互nlu
:自然语言理解引擎交互sphinx
:语音识别引擎sphinx
交互com
:通用模块
sentiment
:文本情感分析引擎,用到的数据集,模型构建和模型加载,用Python实现nlu
:自然语言理解引擎,用到的数据集,模型构建和模型加载,用Python实现sphinx
:离线唤醒模块,包括数据集及模块构建
-
多平台支持
- Windows
- Macos
-
完善文档
- 在多个平台上的编译配置
- 自定义唤醒词
- 扩展自然语言理解
- 扩展行为
-
Python部分用Go或Rust或C++重写
- 替代用到的机器学习库
- 文本情感分析部分:SVM...
- 自然语言理解部分:MITIE...
-
添加对英文的支持
- 离线唤醒
- 语音识别
- 语音合成
- 文档
欢迎通过 issues 提出问题和建议,或通过 Pull Requests 向本项目提交修改
如果你觉得这个项目对你有帮助,可以请作者喝一杯咖啡,支持作者继续开发
Copyright (c) 2019-present Codist