Author Topic: Dictation buffer not clearing  (Read 2464 times)

JGFarris

  • Newbie
  • *
  • Posts: 49
    • My Facebook Page
Dictation buffer not clearing
« on: August 09, 2018, 08:04:14 PM »
okay. Here's a strange issue. I'm using a script that has been exemplified many times on this forum. Take a look.

Stop Dictation Mode (Clearing Dictation Buffer)
Say, 'What would you like your new password to be?'  (and wait until it completes)
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Say, '{DICTATION}'

The problem is that even though the buffer is cleared AFTER the TTS asks the question, the dictation buffer is still retaining what it "hears" the TTS say. (Yes, I'm using open speakers, not a headset). But it shouldn't matter because the script is clearing the buffer AFTER it hears what it says. I've played around with this till I'm blue in the face. Any ideas?
Jerry Farris, Jr.
Entrepreneur, Programmer and Disability Advocate
jerry@jerryfarris.com

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Dictation buffer not clearing
« Reply #1 on: August 09, 2018, 08:38:11 PM »
I believe what's happening is this: The action does clear the buffer, but because the speech recognition engine isn't finished processing the sentence, it gets put into the buffer after it's already cleared.

You can try adding a pause between TTS and dictation, or something like this:
Code: [Select]
Stop Dictation Mode (Clearing Dictation Buffer)
Stop VoiceAttack listening
Say, 'What would you like your new password to be?'  (and wait until it completes)
Start Dictation Mode (Clearing Dictation Buffer)
Start VoiceAttack listening
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Write [Blue] '{DICTATION}' to log

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Dictation buffer not clearing
« Reply #2 on: August 09, 2018, 08:51:41 PM »
Lol.  I had typed up a full response and then inadvertently closed the window o_O

What Pfeil said, BUT, turning the listening on and off may not be enough time (it was my first thought, too).  My suggestion would be to put a one-second pause right before the start dictation action (which is what I'm doing here and it seems to solve it for my setup... you can try varying that to a half second to see if it works).

What is happening is that the speech engine is picking up one long stream of what it thinks is speech from your speakers.  The dictation mode is turned on before there is sufficient time for the current, 'speech' to be ignored, so, it's getting picked up as dictation.  You know that brief pause you have to do between commands?  It's just like that.
Wondering if there is something I could do like what I had done with the, 'Reject Pending Speech' option but just when dictation is turned on... ?

Hope that helps & welcome back, Jerry!
« Last Edit: August 09, 2018, 08:55:00 PM by Gary »

JGFarris

  • Newbie
  • *
  • Posts: 49
    • My Facebook Page
Re: Dictation buffer not clearing
« Reply #3 on: August 09, 2018, 10:50:52 PM »
Thanks. Yes it has been a while. :-)

Yes Gary, that's a great idea by doing something similar to the Reject Pending Speech for dictation mode. I tried setting pauses earlier today with it, and didn't have much luck. I'm not at my work computer right now. Tomorrow, I'll try the pause trick again and post what happens.

Thanks!
Jerry Farris, Jr.
Entrepreneur, Programmer and Disability Advocate
jerry@jerryfarris.com

JGFarris

  • Newbie
  • *
  • Posts: 49
    • My Facebook Page
Re: Dictation buffer not clearing
« Reply #4 on: August 10, 2018, 09:55:01 AM »
okay here's the results. I put space fora one second pause before activating dictation mode. It works as long as I literally wait one second before answering the question. If I don't wait a full one second, then it combines my response with what it heard from the TTS.. :-( Looks like your "reject pending speech" idea for dictation might be the way to go.
Jerry Farris, Jr.
Entrepreneur, Programmer and Disability Advocate
jerry@jerryfarris.com

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Dictation buffer not clearing
« Reply #5 on: August 10, 2018, 11:07:43 AM »
You could also try adding a mic mute action prior to the TTS and then unmuting the mic when the TTS is finished.  You may not need the pause at that point.  Would be a good workaround for the time being.

Other > Windows >  Set Audio Level
Select recording device
Select Mute or Unmute

JGFarris

  • Newbie
  • *
  • Posts: 49
    • My Facebook Page
Re: Dictation buffer not clearing
« Reply #6 on: August 10, 2018, 02:12:47 PM »
Now THAT did the trick! AND no need for any pause. Beautiful!! :)
Jerry Farris, Jr.
Entrepreneur, Programmer and Disability Advocate
jerry@jerryfarris.com