compulim / web-speech-cognitive-services

Polyfill Web Speech API with Cognitive Services Bing Speech for both speech-to-text and text-to-speech service.
https://compulim.github.io/web-speech-cognitive-services
MIT License
61 stars 18 forks source link

Option to turn profanity off #158

Open gurdenbatra opened 3 years ago

gurdenbatra commented 3 years ago

Thanks for this amazing library. I am using MS Azure, is there a way to turn off Profanity(or pass "raw") to the SpeechConfig class?

DeanWronowski commented 2 years ago

I would also know to know if this can be achieved as well

My research so far:

To toggle the option you need to update the audioConfig as mentioned here - https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues/1093#issuecomment-846272350.

To do this, we might be able to update around these lines - speechConfig.outputFormat = OutputFormat.Detailed