react-speech-recognition
react-speech-recognition copied to clipboard
Bugs in abortListening
There are couple of undesirable behaviours in the abortListening method:
- Bug 1 - repro steps:
- Start listening
- Say something to produce an interim transcript
- Before the transcript gets a chance to be finalised, abort listening
- Restart listening
- Say something else
- The interim transcript from step 2 will be replaced by the new transcript. Expected: the new interim transcript should be appended instead
- Bug 2 - repro steps:
- Create Dictaphone that aborts listening on unmount (or
useEffectcleanup) - Start listening
- Say something to produce an interim transcript
- Before the transcript gets a chance to be finalised, unmount the component
- Remount the component
- The interim transcript will still be produced as state from
useSpeechRecognition. Expected: the transcript should be reset on remount
- Create Dictaphone that aborts listening on unmount (or