Turn ChatGPT into Your own Voice AI with Python
For more information about the Vosk speech recognition engine used, refer to: https://alphacephei.com/vosk/ Code used in this video: # TinkerChatGPT by The Tinker Foundry # Giving ChatGPT ears to hear and a voice to speak # ---------------------------------------------------- # Dependencies on python libraries described below # ---------------------------------------------------- # Uses Vosk speech recognition: # pip install vosk # pip install sounddevice # prerequisites: as described in https://alphacephei.com/vosk/install and also python module `sounddevice` (simply run command `pip install sounddevice`) # Also uses text-to-speech (TTS): # pip install pyttsx3 # Of course, we use the openAI api for access to ChatGPT engine: # pip install openai # ---------------------------------------------------- import argparse import queue import sys import json import sounddevice as sd import pyttsx3 import openai from vosk import Model, KaldiRecognizer, SetLogLevel SetLo