[PR #4] [MERGED] fixed: error speechRecognitionList.addFromString is not a function #14

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

📋 Pull Request Information

Original PR: https://github.com/SillyTavern/Extension-Speech-Recognition/pull/4
Author: @aisu-wata0
Created: 4/10/2024
Status: ✅ Merged
Merged: 4/10/2024
Merged by: @Cohee1207

Base: main ← Head: speechRecognitionList-fix


📝 Commits (2)

  • 2c9e216 fixed: error speechRecognitionList.addFromString is not a function
  • c9379b6 chore: made it more compatible

📊 Changes

1 file changed (+6 additions, -2 deletions)

View changed files

📝 browser.js (+6 -2)

📄 Description

When speechRecognitionSettings.grammar is defined, it tries to add it to speechRecognitionList
However, speechRecognitionList (window.webkitSpeechGrammarList) is a constructor, so it's used properly now

to reproduce:
define custom grammar (so that it enters the code block that was changed)
at line 134

        const speechRecognitionSettings = $.extend({
            grammar: 'test', // Custom grammar
        }, options);

enable browser recognition
reload page
image


🔄 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/4 **Author:** [@aisu-wata0](https://github.com/aisu-wata0) **Created:** 4/10/2024 **Status:** ✅ Merged **Merged:** 4/10/2024 **Merged by:** [@Cohee1207](https://github.com/Cohee1207) **Base:** `main` ← **Head:** `speechRecognitionList-fix` --- ### 📝 Commits (2) - [`2c9e216`](https://github.com/SillyTavern/Extension-Speech-Recognition/commit/2c9e216a8a914ca9fd7badf28e7de22c149a0858) fixed: error speechRecognitionList.addFromString is not a function - [`c9379b6`](https://github.com/SillyTavern/Extension-Speech-Recognition/commit/c9379b6c58e46c12f8d30b31dd66743e4200bed6) chore: made it more compatible ### 📊 Changes **1 file changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `browser.js` (+6 -2) </details> ### 📄 Description When `speechRecognitionSettings.grammar` is defined, it tries to add it to `speechRecognitionList` However, `speechRecognitionList` (`window.webkitSpeechGrammarList`) is a constructor, so it's used properly now to reproduce: define custom grammar (so that it enters the code block that was changed) at line 134 ```javascript const speechRecognitionSettings = $.extend({ grammar: 'test', // Custom grammar }, options); ``` enable browser recognition reload page ![image](https://github.com/SillyTavern/Extension-Speech-Recognition/assets/21046091/8810ef41-68a6-4d12-aaf3-0f51e84c1982) --- <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:26 +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#14
No description provided.