Skip to content

OpenAI and Google Cloud for a speech answer to speech respond from OpenAI ChatGPT

Notifications You must be signed in to change notification settings

bryanrandell/ChatGPT_speech_to_speech

Repository files navigation

ChatGPT API Speech to Speech

An interaction with the ChatGPT API using speech to speech. Converting speech to text using OpenAI Whisper API and then sending the text to the ChatGPT API. The response from the ChatGPT API is then converted to speech using Google Text to Speech API.

Requirements

Installation

  1. Install the requirements
pip install -r requirements.txt
  1. Create the json file for Google Text to Speech API Key

  2. Create the .env file for OpenAI API Key

OPENAI_API_KEY=YOUR-SECRET-KEY

Usage

Be careful, the speech to text and text to speech conversion can be charged by the API providers. Read the documentation of the API providers for more information.

Releases

No releases published

Packages

No packages published

Languages