Skip to content

Voice2voice ChatGPT Assistant built through OpenAI Whisper (speech2text) + OpenAI ChatGPT API + Google Text2Speech Service (text2speech)

Notifications You must be signed in to change notification settings

hyili/ChatGPTAssistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Assistant

OpenAI Whisper + OpenAI ChatGPT API + Google Text2Speech Service

Introduce

  • Speech2Text through OpenAI's Whisper Model (currently using local CPU)
  • Chat with ChatGPT through its API
  • Text2Speech through Google's Text2Speech Service
  • Cmdline tools
    • sox: play the .mp3 files
    • arecord: record your voices through microphone (ubuntu default toolset)
    • lame: transform arecord's raw data to .mp3 file

Reference Sites

Attention

  • Whisper would automatically download model before use
  • Make sure use a python virtual env before start

Requirements

# or using scripts/install.sh
$ pip3 insntall -r requirements.txt
$ apt install sox libsox-fmt-all lame
$ mkdir record private audio

# find your api key here: https://platform.openai.com/account/api-keys
$ echo "{CHATGPT_ACCESS_KEY}" > private/api_keys

Run

# you can input text and send to ChatGPT through API
$ ./scripts/run_simple.py

# run_from_voice.py will wait for new audio file
$ ./scripts/run_from_voice.py

# create another shell to run this, and record your speech through microphone (stop by using ctrl+c)
$ ./scripts/record_audio.py

About

Voice2voice ChatGPT Assistant built through OpenAI Whisper (speech2text) + OpenAI ChatGPT API + Google Text2Speech Service (text2speech)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published