react-speech-recognition icon indicating copy to clipboard operation
react-speech-recognition copied to clipboard

Bugs in abortListening

Open JamesBrill opened this issue 4 years ago • 0 comments

There are couple of undesirable behaviours in the abortListening method:

  • Bug 1 - repro steps:
    1. Start listening
    2. Say something to produce an interim transcript
    3. Before the transcript gets a chance to be finalised, abort listening
    4. Restart listening
    5. Say something else
    6. 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:
    1. Create Dictaphone that aborts listening on unmount (or useEffect cleanup)
    2. Start listening
    3. Say something to produce an interim transcript
    4. Before the transcript gets a chance to be finalised, unmount the component
    5. Remount the component
    6. The interim transcript will still be produced as state from useSpeechRecognition. Expected: the transcript should be reset on remount

JamesBrill avatar May 21 '21 13:05 JamesBrill