Close

Offline + Online Voice Assistant

A project log for Smart Speaker from Scratch

Make an open source smart speaker for daily use

yihuiYihui 03/08/2019 at 04:380 Comments

A smart speaker should not only work with Internet, but also work when offline. The ARM processors of most smart speakers are powerful enough to recognize voice commands offline. Here is a demo of how an offline + online voice assistant (Chinese version) looks like. 

The conversation is:

Human : 开灯  ( lights on )

Speaker : ( recognized it offline and turned on the Mi LED Desktop Lamp through local network )

Human : 几点了 ( what's the time )

Speaker: 现在是19点34分 ( it's 19:34 )

Human : 小呆小呆,20/3 等于多少  ( "a hotword", how much is equal to 20/3 )

Speaker: 20/3等于6.667 (20/3 is equal to 6.667)

"开灯 ( lights on )" and "几点了 ( what's the time )" are voice commands which are recognized offline. When a hotword is detected, it will enable online voice service to handle the conversation.

In this demo, I use chumenwenwen's SDK for offline speech recognition and use dueros as the online voice service.

The source code is https://github.com/voice-engine/wenwen/blob/master/alpha.py

Thanks to https://github.com/skorokithakis/python-yeelight that we can control  the Mi LED Desktop Lamp through local network.

Next step is to make an English version. Stay tuned!

Discussions