D'Fontalland
D'Fontalland

Reputation: 355

Is there a noise cancellation for SFSpeechRecognizer on iOS?

I'm working with SFSpeechRecognizer on my app for detecting a wake word in a chat app. I do a setup for the AudioEngine, create my speech recognition request and the SFSpeechRecognitionTask. For the SFSpeechRecognizer I'm using the en-US locale.

Everything works well, but from time to time, on that app, I play an audio about some text. When I do that, the recognizer captures the whole text that is being said in the device's speaker. I have no problem with that as I know the wake word was not spoken. But, if I try to say it, the recognizer will not detect it since there is some other text being capture from the device's speaker, what is much closer of the microphone than my voice.

Another important info would be my AudioSession. Right now I'm setting up as below:

try audioSession.setCategory(.playAndRecord, mode: Mode.spokenAudio, options: [.duckOthers, .allowBluetoothA2DP]) try audioSession.setActive(true, options: .notifyOthersOnDeactivation)

Is there a way I can tell the recognizer what sounds, audio-waves, or buffer to ignore or a noise reduction?

Thanks all for the help.

So far I tried changing configurations for my AudioSession, mainly about the mode, trying to have a better catch of my voice over the speaker noise. I also tried to check the SFSpeechRecognizer result looks for the voice analytics on an attempt of differentiating the audio voice played by the app from my voice but I didn't get so far on that. Till this point, I found no ways to do any kind of noise cancellation or noise reduction for this recognizer.

Upvotes: 0

Views: 150

Answers (0)

Related Questions