Skip to content

tomzhu0225/oral_practice_with_openai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A video introduction in Chinese

Dependency

This application is based on OpenAI APIs and Microsoft Azure Cognitive Services.

API keys from both platforms are needed.

Additional needed python packages are: OpenAI Python Library, azure-cognitiveservices-speech, PyQt5

pip install openai azure-cognitiveservices-speech PyQt5

Usage

Get API keys from OpenAI

  1. Log in to OpenAI.
  2. In the overview page, click the upper right icon, and then click "View API keys".
  3. In the API keys page, click "+ Create new secret key", which will generate the secret key. Be sure to save it because it cannot be seen a second time.

Get API keys from Microsoft Microsoft Azure Cognitive Services

  1. Log in to Microsoft Azure.
  2. In the search banner, search "Speech Service".
  3. Create an instance for Speech Service.
  4. On the page of the instance you created, click "Keys and Endpoint" under "Resource Management" on the left.
  5. Copy one of the keys and the "Location/Region".

Application Usage

Under the root directory, run src/main.py by running:

python src/main.py

The first time you run the program, you need to enter OpenAI API keys, default language, Azure API keys, and Azure Region. The settings will be saved under the root directory so that you do not need to enter the settings the next time you run the program.

Click the "Speak" button below. Then SPEAK!

On the toolbar, click "Suggestion", which will show the suggested response generated by ChatGPT. However, this will lower the speed because you need one more access every time.

Updates

Add hide text function (04/02/2023)

Web page version developed(07/02/2023): link Alt Text

TODO list

Under construction

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages