Skip to content

caij3/dialogpt-bot

Repository files navigation

DialoGPT Bot

This is a general purpose voice chatbot created using DialoGPT, combined with the use of WhisperAI and Microsoft text-to-speech.

Installation

To install, you can clone the repository using: git clone https://github.com/caij3/dialogpt-bot
If git is not installed, you can download the ZIP file and unzip it.
You can install dependencies using: pip install -r requirements.txt

Note: For Whisper AI speech recognition, you must install ffmpeg. A guide for installation can be found here: https://phoenixnap.com/kb/ffmpeg-windows

If you are receiving an error, follow the Troubleshooting section found at the end of this README

How to use

To use this program, run the main.py python file. You can use the command: python main.py
Once run, wait until you see the Listening prompt before speaking. The chatbot will then respond.

How it works

The program receives input from the microphone and converts it to text. This can be done using two options: either through Whisper AI's speech recognition or Google's speech recognition. It then passes the input through Microsoft's DialoGPT large language model. After receiving a response from DialoGPT, the response is converted to an audio file and spoken with using Microsoft's text-to-speech.

Troubleshooting

Error: AttributeError: Could not find PyAudio; check installation...can't use speech Recognition
Solution: Either PyAudio is not installed or you have an incorrect version of playsound.

To install PyAudio, use pip install PyAudio
If PyAudio is already installed and you are still receiving this error, try a different version of playsound. To do this, use:
pip uninstall playsound
pip install playsound==1.2.2

Other comments

Whisper AI is trained using Youtube videos, where many videos would have "thank you for watching" or a similar caption near the end of the video even if there is nobody talking. This causes Whisper AI to transcribe anything inaudible to "thank you".

About

A text-to-speech voice chatbot using DialoGPT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages