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

Talk to ChatGPT stops listening #72

Closed Ranensol closed 1 year ago

Ranensol commented 1 year ago

Love this extension, conversing with the AI is so much faster than typing, so thanks! just having an issue that I can't quite figure out.

I'm using Chrome version: Version 112.0.5615.121 (Official Build) (64-bit)

I'm running v2.2 of this extension now but had the same issue with v2.1, essentially this extension stops listening after a number of messages, in that the bar goes grey (instead of red), and I need to either disable and enable voice recognition or reload the webpage and 'Start' the extension again for it to start listening again.

I've tried with both text to speech on and off, I noticed the extension won't take commands while it speaks so I prefer that off as generally I'm asking things with long responses, but it's the same whether it's off or on or the responses are short or long.

I asked it to respond with a single word (for testing) and simply said 'again' until the extension failed, sometimes it'll fail after the 1st message, sometimes the 2nd, sometimes the 20th, though it typically fails in under 10 prompts.

I disabled all my extensions except for this one in case there were any conflicts etc, but that doesn't seem to have affected it.

If it was or wasn't working I'd say it was maybe my setup/mic/etc, but with it working then stopping it possibly suggests something in the code(?) but I don't know enough about it to make any changes.

If you have chance to look at this and suggest some solutions that'd be appreciated as I'd love to use your work, but I understand it's free and have no expectations!

Ranensol commented 1 year ago

Actually, clicking 'Skip' once (whether text to speech is on or off) does have the same effect in that it starts listening again when you click it, but it still then fails after 'n' messages.

Just mentioning it in case it's relevant.

Happyme222 commented 1 year ago

Hello Ranensol, I've tried to install but gives me an error on icons install. Do you have an images folder on your zipped file?

Happyme222 commented 1 year ago

Error: " Could not load icon 'images/icon-16.png' specified in 'icons'."

Ranensol commented 1 year ago

Probably best to keep that in your issue thread rather than muddying another bud, I'll respond in there :)

Ranensol commented 1 year ago

As a small update, if I turn off auto-sending I can talk then hit 'Enter' to send the message indefinitely (i.e. its not crashed in the last few hours).

C-Nedelcu commented 1 year ago

Hello Ranensol, I've tried to install but gives me an error on icons install. Do you have an images folder on your zipped file?

sorry, I forgot to include the images in the .zip package. I've repackaged it now, should be OK if you download the zip file again.

Love this extension, conversing with the AI is so much faster than typing, so thanks! just having an issue that I can't quite figure out.

I'm using Chrome version: Version 112.0.5615.121 (Official Build) (64-bit)

I'm running v2.2 of this extension now but had the same issue with v2.1, essentially this extension stops listening after a number of messages, in that the bar goes grey (instead of red), and I need to either disable and enable voice recognition or reload the webpage and 'Start' the extension again for it to start listening again.

I've tried with both text to speech on and off, I noticed the extension won't take commands while it speaks so I prefer that off as generally I'm asking things with long responses, but it's the same whether it's off or on or the responses are short or long.

I asked it to respond with a single word (for testing) and simply said 'again' until the extension failed, sometimes it'll fail after the 1st message, sometimes the 2nd, sometimes the 20th, though it typically fails in under 10 prompts.

I disabled all my extensions except for this one in case there were any conflicts etc, but that doesn't seem to have affected it.

If it was or wasn't working I'd say it was maybe my setup/mic/etc, but with it working then stopping it possibly suggests something in the code(?) but I don't know enough about it to make any changes.

If you have chance to look at this and suggest some solutions that'd be appreciated as I'd love to use your work, but I understand it's free and have no expectations!

I've never had this issue so far and it seems you're the first to report it. I have tested a long conversation just now with about 50 back and forth questions and replies, short, long, everything seemed normal. Could it have something to do with me having a + account? are you using the free version? What is your OS? What voice/language are you using? Are you getting any javascript or network error when the bug occurs? Maybe try exporting the console logs?

Ranensol commented 1 year ago

1st, apologies for the confusion on Issue 73, I think my assistance led some people to believe I'd had some hand in the hard work put into this extension which I obviously haven't!

Thanks for the reply, intermittent issues are always a pain...

In answer to your questions:

I've attached console logs with Text-to-Speech enabled/disabled for comparison. With it enabled it looks like at some point it didn't pickup what I was saying, and then stopped listening. With it disabled it threw a DOM error, then heard what I was saying, and then stopped listening.

Let me know if there's anything else I can try that'll help! Text-to-Speech - Disabled.log Text-to-Speech - Enabled.log

C-Nedelcu commented 1 year ago

I'm seeing something weird in the logs: https://prnt.sc/9HjXbL6cIfSR

Your browser thinks you said something, but it comes out empty. So it tries sending it to ChatGPT but it fails (since ChatGPT won't accept empty messages). Consequently, Talk-To-ChatGPT expects an answer from ChatGPT which it never gets.

I suppose I could add some sort of fix - if the speech recognition comes out empty (which btw is NOT supposed to happen!?) then just ignore it and continue listening.

Meanwhile, you should maybe look into why your speech recognition detects speech and comes out empty. Maybe too much noise? a bad mic?

Ranensol commented 1 year ago

Yeah that does look weird, though it has stopped listening and not re-started even when it did detect what I was saying (could be 2 different issues tbf).

I'm using a Steel Series Arctis 7 that's about 18 months old, and have daily calls with the office (I work from home), which doesn't necessarily rule it out but if there were obvious issues one of the team would have mentioned it ("Are you in another room or something?" or "Why do you sound like a Dalek?", the usual...).

I have just cranked up the mic volume, used a feedback loop so I can hear my own voice/level (I do hate the sound of my own voice... but it seemed clear), and tried again taking care to speak clearly and loudly and still get 'Voice recognition: ''' and it stopping listening.

Ranensol commented 1 year ago

The thing that really doesn't add up or make sense though, is that it will keep working as long as I turn the auto-send off, don't use the 'send message now' key phrase, and just hit enter to send my messages.

I spent a couple hours asking it questions (long and short) yesterday without any issues by just speaking and hitting enter.

C-Nedelcu commented 1 year ago

Actually it totally makes sense to me.

In automatic send mode, the addon will automatically send an empty sentence and expect a response. Since the message doesn't get sent, there is never a response, so the addon is stuck in a waiting loop.

In manual send mode, the addon will add whatever you say to the text area. So if the speech recognition comes up with an empty sentence, then the empty bit is added to the textarea and the addon continues listening.

I imagine this must be happening to other people so I've marked your issue as 'Bug' and will fix it in an upcoming release.

Ranensol commented 1 year ago

Hmm that should result in missing text then if it's occasionally missing what I say, but to be honest I wasn't checking what actually appeared in the text area because I was getting answers that I expected.

That said there were a few times where the response wasn't quite right, but I just put that down ChatGPT getting confused or misunderstanding me, however that could well have been this issue manifesting.

Ok that's great, thanks for help and responses, I'll keep an eye out on the releases and use manual for now (it's still considerably faster than typing and almost Jarvis like ;) ).

C-Nedelcu commented 1 year ago

I've published v2.3.0 which comes with an attempt to fix this issue. Would you please try it and let me know if this solves your issue? I've barely submitted v2.2.0 to the Chrome store this morning, so v2.3.0 wont be on the store for several more days. If you want to give it a try you'd better install the new version manually :)

C-Nedelcu commented 1 year ago

I'm going to mark this as fixed now but please let me know if you're still having issues.

blabberbytes commented 1 year ago

This happening to me. updated google chrome on talk-tochatgpt 2.6. on mac

C-Nedelcu commented 1 year ago

This happening to me. updated google chrome on talk-tochatgpt 2.6. on mac

hello, I think it might be a separate issue. are you able to reproduce issue and explains the steps exactly? if you can get the console logs too, that would help. Thanks!