[wdmaudiodev] MFX APO implementation for SPEECH mode (Cortana)

  • From: Martin Ordell Sørensen <odl@xxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 25 Sep 2018 10:03:58 +0000

Hi, I am hoping that someone can help shed some light on how to implement an 
APO for SPEECH processing on a microphone signal.

I am trying to figure out how a APO for SPEECH mode microphone processing 
should be implemented.
I start from this link:
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/voice-activation

It states that AEC, AGC and NS should be implemented as an MFX APO. This MFX 
APO may do format conversion, but what does that mean exactly? Is it allowed to 
do 48 kHz -> 16 kHz or does ‘format conversion’ simply mean non-FLOAT -> FLOAT?
It states that the APO must support 16 kHz mono FLOAT output but not what kind 
of input formats it needs to support. Normally, I believe an APO cannot do 
different input/output sample rates but is this somehow allowed in this case?
Also, in case of a device with 2 microphones, can this MFX APO do 2 ch -> 1 ch?

I have tried configuring an MFX APO to only accept 16 kHz -> 16 kHz mono float 
but it seems to not be accepted by AudioDG. When I run the OEM Verification 
Tool to start a SPEECH mode recording, I can see that it tries to initialize 
the APO with 48 kHz 2 ch -> 48 kHz 2ch SPEECH mode, but after returning S_FALSE 
from IsInputFormatSupported() with a 16 kHz format proposal, I see no further 
calls to IsInputFormatSupported() and the APO is never inserted so it looks to 
me like this is not an accepted format?

For performance reasons, it would be optimal to have the processing running in 
16 kHz since this is also what Cortana receives in the end. I can make it load 
an APO and process audio with 48 kHz -> 48 kHz SPEECH mode, but then the system 
inserts an SRC afterwards and this is what I would like to avoid. It also 
doesn’t correspond to what the documentation reads above.

I am testing on an 1803 build.

Best regards, Martin

Other related posts: