Closed EggTronic closed 4 years ago
Aha I see the chicken-and-egg problem here. You cannot use resetTranscript
from the command definition because this is only defined after calling useSpeechRecognition
with the commands. I will create a solution for this, hopefully by the end of today.
@EggTronic I have attempted to address this in v3.2.0. An object containing resetTranscript
is passed to the command callbacks as the last argument. e.g.
{
command: 'clear',
callback: ({ resetTranscript }) => resetTranscript()
}
Let me know how you get on with that.
@JamesBrill wow thanks!!! Your problem-solving speed is amazing!
I want to clear the transcripts once the certain commands have been executed.