- User joins voice channel
- Bot greets user and explains how does conversation work using TTS
- Bot records user audio for 5 seconds
- Audio file is passed to Speech Recognition
- Text received from Speech Recognition is added to chat log
- Chat log is passed to GPT-3 API
- GPT-3 API generates response
- Response gets filter label assigned by GPT-3 API
- If response gets filtered GPT-3 API generates new response
- When response passed filter, bot adds it into chat log
- Chat log gets send to discord chat log text channel (message gets edited every interaction to avoid spam)
- Bot says response using TTS
- After TTS finished bot goes back to step 3
- When user leaves voice channel chat log gets reseted and bot waits for another user to join
- Bot recognizes command by prefix or slash command
- Bot passes user input to GPT-3 API
- GPT-3 API generates response
- Response gets filter label assigned by GPT-3 API
- If response gets filtered GPT-3 API generates new response
- When response passed filter, bot replies to user with response
- Voice channel that bot auto-joins with user limit set to 2
- Text channel for chat log
- GPT-3 API Key
- Wit.ai API Key
- Discord Bot Token
- Can work on only one server at a time
- Can speak with only one user on a channel at a time
Tool | Function |
---|---|
OpenAI GPT-3 | Filter and Responses |
Modified version of Sheepposu's discord.py fork | Recieving and saving discord audio |
gTTS | Text to speech |
SpeechRecognition | Converting user audio to text |