A local, interactive, speech-based chatbot with Rasa and Mozilla Deepspeech/TTS
This was heavily inspired by the excellent example from Rasa here, the TTS colab here and the deepspeech docs here
To set up speechbot:
pip install -r requirments.txt
sh setup_stt.sh
sh setup_tts.sh
Note: if PyAudio is having trouble installing, try sudo apt install portaudio19-dev python3-pyaudio
Once setup is complete, the example scripts should work. To run the rasa example you will need to start one of the rasa bots, which can be done by entering the rasa_[bot] directory and calling $rasa run
. I recommend starting with the rasa_example, as rasa_greeter is still a work in progress.
To add a new bot, you just have to copy the custom_channel.py into your bot's addons directory, and copy the following into the credentials.yml:
addons.custom_channel.MyIO:
username: "user_name"
another_parameter: "some value"
To converse with this bot, you will need to rasa train
and rasa run
in the bot's directory and launch speechbot_example.py or rasa_example.py (if you don't want to use your voice).
Todo:
- Debugging threading issues
- Simplifying use of TTS library (is there a pip package?)
- Setting up alternate voice models