[PR #23] [MERGED] Fix microphone always active #27

Closed
opened 2026-10-15 13:27:31 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SillyTavern/Extension-Speech-Recognition/pull/23
Author: @Ni-co-la-s
Created: 8/17/2025
Status: ✅ Merged
Merged: 8/18/2025
Merged by: @Cohee1207

Base: main ← Head: fix-microphone-usage


📝 Commits (4)

📊 Changes

1 file changed (+64 additions, -4 deletions)

View changed files

📝 index.js (+64 -4)

📄 Description

Description

Inspired by #21.

Fixes microphone always being active even when voice activation is disabled by implementing conditional microphone access that only activates when needed.

https://github.com/user-attachments/assets/bdca312c-b577-4d2b-a672-ec0ef9941966

Main changes

index.js

when "Enable activation by voice" is unchecked:

  • Turns off VAD
  • Enforces lazy microphone access (not until the user presses the microphone button)
  • Releases microphone completely after each recording

How to Test

  • Open a chat/group
  • Go to Speech recognition extension panel
  • Select a STT provider
  • Uncheck "Enable activation by voice"
  • Verify that the microphone is not accessed by the browser
  • Press the microphone button and record a message.
  • Verify that the transcription is done properly
  • Also test with "Enable activation by voice" checked to make sure there is no regression

Note:

  • Tested it Open AI Whisper on Brave, Firefox and Chrome browser

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SillyTavern/Extension-Speech-Recognition/pull/23 **Author:** [@Ni-co-la-s](https://github.com/Ni-co-la-s) **Created:** 8/17/2025 **Status:** ✅ Merged **Merged:** 8/18/2025 **Merged by:** [@Cohee1207](https://github.com/Cohee1207) **Base:** `main` ← **Head:** `fix-microphone-usage` --- ### 📝 Commits (4) - [`aa5ef4c`](https://github.com/SillyTavern/Extension-Speech-Recognition/commit/aa5ef4cc592e25813679a9d867baf240e02b2338) Fix microphone always active - [`87b5bad`](https://github.com/SillyTavern/Extension-Speech-Recognition/commit/87b5bad023d8b59bde2ec93617cbcab73d4e0b6b) Update index.js - [`357da10`](https://github.com/SillyTavern/Extension-Speech-Recognition/commit/357da10eb2c400de51fa74ab1557c186b4d33ac3) Refactor - [`eebdd47`](https://github.com/SillyTavern/Extension-Speech-Recognition/commit/eebdd47a64cd2b2271ac85ddd414cb7118f23d5a) Formatting fix ### 📊 Changes **1 file changed** (+64 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `index.js` (+64 -4) </details> ### 📄 Description ## Description Inspired by [#21](https://github.com/SillyTavern/Extension-Speech-Recognition/issues/21). Fixes microphone always being active even when voice activation is disabled by implementing conditional microphone access that only activates when needed. https://github.com/user-attachments/assets/bdca312c-b577-4d2b-a672-ec0ef9941966 ## Main changes ### index.js when "Enable activation by voice" is unchecked: - Turns off VAD - Enforces lazy microphone access (not until the user presses the microphone button) - Releases microphone completely after each recording ## How to Test - Open a chat/group - Go to Speech recognition extension panel - Select a STT provider - Uncheck "Enable activation by voice" - Verify that the microphone is not accessed by the browser - Press the microphone button and record a message. - Verify that the transcription is done properly - Also test with "Enable activation by voice" checked to make sure there is no regression ## Note: - Tested it Open AI Whisper on Brave, Firefox and Chrome browser --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 13:27:31 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/Extension-Speech-Recognition#27
No description provided.