Shiyu Mou Iquotient Robotics shiyumou@usc.edu
This is my Voice Assistant featured with hot-word detection (Alexa!), natural language chatting (in Chinese), and voice control of ROS robot.
-
Ubuntu 14.04 or later.
-
Clone the repository.
-
Install pygame:
sudo apt-get install python-pygame
-
Install voicetools:
sudo pip install voicetools
-
Other dependencies:
sudo apt-get install swig3.0 python-pyaudio python3-pyaudio sox
pip install pyaudio
sudo apt-get install libatlas-base-dev
-
Upgrade requests:
git clone git://github.com/requests/requests.git
cd requests
pip install .
-
Install pyaudio:
sudo apt-get install portaudio19-dev python-all-dev python3-all-dev && sudo pip install pyaudio==0.2.11
-
Install ffmpeg: https://www.faqforge.com/linux/how-to-install-ffmpeg-on-ubuntu-14-04/
-
This code includes voice control of ROS robot, so you may also need to install ROS.
-
This program is using Baidu Voice APIs for TTS and STT, Turing Robot for text understanding and replying, you may apply your own keys in these two website and replace them in main() function of run_chatbot.py
- Bring up roscore.
- cd to ~/chatbot
- Run:
python run_chatbot.py resources/alexa.umdl
- Say "Alexa!" to wake up the chatbot
- After hearing an alert sound, you can talk to Alexa (in Chinese).
- You can say: "前进", “后退”, “左转”, “右转” to control a ROS robot. The default rostopic is
/cmd_vel_mux/input/teleop
, you can modify this in line 176 of run_chatbot.py.
Now the chatbot is using an universal hot-word for waking-up. But no surprisingly, you can give a new name to this chatbot!
- Open the link here: https://snowboy.kitt.ai/dashboard
- Login using your preferred method.
- Click "Create Hotword" and follow the instructions.
- Download the model named with '.pmdl' to
~/chatbot/resources/
- Run the code with:
python run_chatbot.py resources/your-own-model's-name.pmdl