C-Nedelcu / talk-to-chatgpt

Talk to ChatGPT AI using your voice and listen to its answers through a voice
GNU Affero General Public License v3.0
1.97k stars 333 forks source link

Question about a similar feature in my VR app #86

Closed achraf-oujjir closed 1 year ago

achraf-oujjir commented 1 year ago

Context: I want to make gpt-powered NPCs using the APIs of ChatGPT and Whisper on unity. I want to ask you about the duration of the voice prompt. How to make an 'infinite' duration of recording, as in, it will only answer when you finish. And there is also another issue of gpt being unable to respond with very long answers. A lot of times, it truncates its own answer at a certain point.

I also want to ask about the case of the user interrupting the ai voice. Will this mean that the recording should be continuous ? If yes, what will be the 'max' duration of the 'audio cache' before it reboots again ??

C-Nedelcu commented 1 year ago

"How to make an 'infinite' duration of recording, as in, it will only answer when you finish."

How does it know when you finish then?

You can currently achieve this, as long as you speak the speech recognition will continue, and when you stop speaking the message is sent.

The speech recognition works in a way that if you stop speaking for ... I dont know, 1 or 2 seconds? then it considers that you are finished speaking. This is how the standard HTML5 speech recognition API in web browsers works.

C-Nedelcu commented 1 year ago

closed due to inactivity. Feel free to reopen later if necessary