I am using a webkitSpeechRecognition instance to access the built-in speech recognition in Chrome. The problem is that the Web Speech API specification does not cover the topic of profanity filtering, but the Google Speech API has a profanity filter by default. This is not a big problem - fortunately, the default filter for the Web Speech API shows the first letter and hides the rest under the asterisks. However, there are times when a word starting with a certain letter and having a certain length comes from different words of the reservation and guesses what the person said may not give an exact result.
The question here is: how can I control the filtering level of profanity Web Speech API in Chrome? The JavaScript instance does not provide any additional (platform-specific) variables that can be played with. The actual speech API had the pfilter URL parameter, which can be set to 0 (without filtering), 1 (filtering and replacing words with ####), or 2 (filtering and replacing everything except the first letter with asterisks). This option is also available for Chrome Extension developers, it is located in SpeechInputStartOptions (however it is a boolean variable).
PS SpeechInputStartOptions documentation talks about Chromeβs default filtering settings. I could not find the settings for this or any information about where it is located. Despite the fact that, ideally, the solution should not force the user to do something, the search for settings in Chrome for him will still be a breakthrough.
javascript google-chrome webspeech-api
Xeos
source share