C2LC-20: Toggling speech recognition switch on and off quickly causes an error

Description

Steps to reproduce:

  • Open C2LC react version on Chrome browser
  • Rapidly toggle Speech Recognition switch on and off

Expected:

  • Should enable speech recognition on and off without an error

Actual:

  • Get InvalidStateError that says “InvalidStateError: Failed to execute ‘start’ on ‘SpeechRecognition’: recognition has already started.”