Closed QishengLi closed 5 years ago
Hi Qisheng, I have been unable to reproduce your issue - using your exact code, stopListening
and abortListening
work correctly for me.
Some questions:
react-speech-recognition
are you using?Dictaphone
? Is it being rendered multiple times? It would be useful to see the parent component's render
function (where you write <Dictaphone />
).Some tips:
transcript
prop - this is the most complete version of the transcript. finalTranscript
only includes text that the speech recognition algorithm has finished processing and will be slower to render.
Thank you a lot, James! I figured it out that the reason was Dictaphone
being rendered multiple times.
Hi I am new to React and trying to use react-speech-recognition. I am trying to start & stop listening to the microphone by click buttons. However, it seems that it's still listening after I click 'stop' button and the transcription is still updating.
Attaching the code here. Any advice will be helpful!
(Sorry for the bad formatting!)