I am using webkitSpeechRecognition
instance to access the native speech recognition in Chrome. The problem is that the Web Speech API specification does not cover the topic of profanity filtering, yet Google's Speech API, by default, has the profanity filter enabled. It is not a major problem - luckily the default filter for Web Speech API shows the first letter and hides the rest under the asterisks. However there are cases when a word starting with a certain letter and having a certain length be derived from different cuss words and guessing what the person has said may not give an accurate result.
The question here is: how can the profanity filtering level of Web Speech API in Chrome be controlled? The JavaScript instance does not expose any additional (platform specific) variables to play around with. The actual Speech API had the pfilter
URL parameter which can be set to 0 (no filtering), 1 (filtering and replacing words with ####) or 2 (filtering and replacing all but the first letter with asterisks). This parameter is also exposed for Chrome Extension developers, it is located in SpeechInputStartOptions
(however it is a boolean variable).
P.S. The SpeechInputStartOptions documentation talks about default Chrome filtering settings. I could not find the setting for this or any information about where it is located. Even though ideally, the solution should not involve user having to do something, finding the in-Chrome setting for it would still be a breakthrough.
serviceURI
which could have some arguments in it. – Hamann&pfilter=0
, so I think you wish to control it. Then, define how would u like to control it! – Armagnacpfilter
param through the Web API, then that would make a good answer. (theserviceURI
parameter that moka talked about has been disabled in Chrome, so not sure how you'd pass it...) – Impact