A smart AI voice assistant with multi-language support and long-term memory. Currently best for Swedish and English. Compatible with Windows and Raspberry Pi. The assistant can use various functions and tools to answer question (Google, Wolfram Alpha, etc.). Based on OpenAI's GPT-models, Google STT and TTS, and ElevenLabs TTS.
If you do not want to gather all of this information or do not have time, simply do not save them to the "apiKeys.py" file. Only the OpenAI API Key is required for the assistant to function. However, I recommend to use its full potential by filling in the information. It is really fascinating!
Save these keys and ID's to the "apiKeys.py" file (only the OpenAI API Key is required):
Run these commands to install packages on a Raspberry Pi (terminal):
sudo apt-get install flac espeak sox portaudio19-dev
sudo pip3 install pyaudio pvporcupine pyttsx3 SpeechRecognition requests openai google-api-python-client python-vlc Adafruit_DHT luma.led_matrix wolframalpha langchain google-cloud-speech google-cloud-texttospeech mutagen tiktoken colorama
python {PROJECT DIRECTORY}\VoiceAssistant.py
OR run python3 script:
python3 "{PROJECT DIRECTORY}\VoiceAssistant.py"
(Example: python "C:\Users\username\Documents\VoiceAssistant\test.py"
)Run these commands, and follow the steps to install the packages (PowerShell terminal):
Invoke-WebRequest -Uri https://bootstrap.pypa.io/get-pip.py -OutFile get-pip.py; python get-pip.py
python -m venv "{PROJECT DIRECTORY}\venv"
(Example: python -m venv "C:\Users\username\Documents\VoiceAssistant\venv"
)& "{PROJECT DIRECTORY}\venv\Scripts\Activate.ps1"
pip install pyaudio pvporcupine pyttsx3 SpeechRecognition requests openai google-api-python-client pygame wolframalpha langchain google-cloud-speech google-cloud-texttospeech mutagen tiktoken colorama
Run these commands to start the program in Windows PowerShell:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
& "{PROJECT DIRECTORY}\venv\Scripts\Activate.ps1"
& python "{PROJECT DIRECTORY}\VoiceAssistant.py"
OR run python3 script:
& python3 "{PROJECT DIRECTORY}\VoiceAssistant.py"
(Example: & python "C:\Users\username\Documents\VoiceAssistant\test.py"
)