ChatGPT Voice Assistant

githubchatgpt

This is a python code that uses ChatGPT, a large language model trained by OpenAI, as a voice assistant.

To use this code, you need to have Python 3.x and the following libraries installed:

  • openai
  • pyaudio
  • SpeechRecognition
  • pyttsx3

You can install the required libraries using pip:

There are two python files the one finising in "es" is for spanish users because it translate the text to spanish instead of enlgish.

ChatGPT will then process your query or command and provide a response. The response will be both printed to the console and spoken out loud using text-to-speech technology.

This code uses the ChatGPT model from OpenAI and the following libraries:

  • openai - Openai provides the ChatGPT model for the responses.
  • pyaudio - PyAudio provides Python bindings for the PortAudio library, which is used for audio input and output.
  • SpeechRecognition - The SpeechRecognition library provides support for performing speech recognition on audio input using Google's speech recognition technology.
  • pyttsx3 - pyttsx3 is a text-to-speech conversion library in Python.