Skip to content

[Bug] Voice recognition persists after chat window is closed. #372

@MadsNeis

Description

@MadsNeis

Bug Description:
When a user enables voice input and then closes the chat window, the microphone continues recording their voice in the background. The toggleOn variable in VoiceService.ts is never reset when the UI is dismissed, so speech recognition keeps running silently with no visual indicator on the page.

Steps To Reproduce:
Steps to reproduce the bug behavior:

  1. Go to App.tsx and enable voice recognition for your ChatBot component by adding settings={{ voice: { disabled: false } }}
  2. Open the chat window and click the microphone icon to enable voice input.
  3. Close the chat window using the X button.
  4. Microphone remains active in the background. If the user speaks and returns to the chat window, user can see what they said has been sent through to the ChatBot.

Expected behavior:
Voice recognition should stop when the user closes the chat window.

Screenshots:
N/A
Library version:
2.5.0

Desktop:

  • OS: macOS
  • Browser: Chrome

Additional context:
stopVoiceRecording() does not appear to be called as part of the chat window close handler, meaning the microphone is never properly released on UI dismissal. Calling stopVoiceRecording() on window close would resolve this.
Note: This issue was identified during a code inspection conducted for an open source software course at Oregon State University.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions