https://github.com/AppleHolic/chatgpt-streamlit
Simple demo project with OpenAI's API and TTS
https://github.com/AppleHolic/chatgpt-streamlit
chatgpt openai streamlit tts whisper
Last synced: over 1 year ago
JSON representation
Simple demo project with OpenAI's API and TTS
- Host: GitHub
- URL: https://github.com/AppleHolic/chatgpt-streamlit
- Owner: AppleHolic
- Created: 2023-03-02T12:15:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T15:49:21.000Z (over 3 years ago)
- Last Synced: 2024-10-24T10:08:03.206Z (over 1 year ago)
- Topics: chatgpt, openai, streamlit, tts, whisper
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 15
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ChatGPT Streamlit
This project for making a demo based on ChatGPT and speech interfaces via [streamlit](https://docs.streamlit.io/).
- Docs of ChatGPT and Whisper API : [OpenAI Documentation](https://platform.openai.com/docs/introduction)
- Workflow of demo
1. Recording audio
2. STT (Speech-to-text) with Whisper API
3. Get an answer from ChatGPT API
4. (optional) Making an audio from ChatGPT's answer
## Usage
- Environment
- python 3.10
- GPU : cuda 11.6, RTX Titan
- OS : ubuntu20.04 - wsl2
- IDE : VSCode
- OpenAI API
- You must get a secrey key of OpenAI platform from [This Page.](https://platform.openai.com/account/api-keys)
- Install and run
```bash
# with virtualenv
$ virtualenv .venv
$ . .venv/bin/activate
# openai - chatgpt, whisper only
$ pip install .
# openai with simple TTS (with cpu version of pytorch)
$ pip install .[tts] --extra-index-url https://download.pytorch.org/whl/cpu
# run streamlit - with environment variable of API KEY
$ OPENAI_API_KEY=[YOUR-API-KEY] streamlit run chatgpt_streamlit/app.py
```
## Others
- Demo Page (all tasks of workflow are done)
