Adri6336 / gpt-voice-conversation-chatbot

Allows you to have an engaging and safely emotive spoken / CLI conversation with the AI ChatGPT / GPT-4 while giving you the option to let it remember things discussed.
GNU General Public License v3.0
300 stars 50 forks source link

processing time of prompts is really long #3

Closed shadowdoggie closed 1 year ago

shadowdoggie commented 1 year ago

Hello Adri6336 :D

I absolutely love your program, it includes everything i want pretty much, but the processing time of a prompt takes about 5 seconds every time.

Is there anything you can do to improve this delay?

Also, is there any way to choose a elevenlabs voice?

tyvm in advance!

Adri6336 commented 1 year ago

Heyo, I'm super happy to hear you're liking it so far! :D

Unfortunately I won't be able to greatly affect any delays in communication. Every message has to be sent to OpenAI, so their responsivity is the first thing to determine speed in both the CLI and voice-chat versions. Additionally if you're using the voice-chat version, your speech must be interpreted by Google speech to text services. Then finally, if you're using the voice-chat version or the CLI spoken mode, the text will be spoken by Elevenlabs or Google TTS. The side effect of this is that a speedy conversation relies on all the 3rd party services being up and responsive.

The best way to speed up conversations would be to limit connections to OpenAI only. To do this, you can run the gptcli.py script, then enter '!robospeak()'. You'll lose the ability to speak with your voice, but you'll still be able to hear the responses and it should be slightly faster.

The ability to switch voices is something I can affect though! This is definitely something I want to add soon. Things keep coming up, so I keep delaying it in favor of other changes lol, but I def do plan to add it.

I really appreciate your feedback yo!

axefrog commented 1 year ago

@Adri6336 In your requests to the OpenAI completions API, you can enable streaming, then you'll be able to display the responses in streamed chunks, like you see when using the standard ChatGPT UI.