ChatGPT Voice Assisant on Raspberry Pi using custom data, ChatGPT, Whisper API, Speech Recognition and Pyttsx3
Raspberry Pi can be used to build a voice assistant using Chat GPT and Whisper API as shown here . This article shows how to customize the voice assistant application using your own data, e.g., pdf documents, financial data etc. Now, to train and create an AI chatbot based on a custom knowledge base, we need to get an API key from OpenAI. The API key will allow you to use OpenAI’s model as the LLM to study your custom data and draw inferences. The Chat GPT library needs to be configured with an account's secret key which is available on the website . Set the api key OPENAI_API_KEY. This API key let you use OpenAI’s model as the LLM for any custom data and draw inferences. os.environ["OPENAI_API_KEY"] = 'YOUR API KEY' Copy the custom data documents on a specific directory on Raspberry pi. e.g., /home/pi/Documents Use the Recognizer class from the Speech Recognition library to recognize spoken words and phrases. if __name__ == "__main__": ...