[wdmaudiodev] Re: Has anyone ever written a hardware keyword spotter driver?

  • From: "Gary Daniels" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Gary.Daniels" for DMARC)
  • To: Gordon Lewis <glewis9999@xxxxxxxxxxx>, "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 16 Jan 2020 19:38:03 +0000

Sure, not a problem.

-Gary


Sent from Outlook<http://aka.ms/weboutlook>

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Gordon Lewis <glewis9999@xxxxxxxxxxx>
Sent: Saturday, January 11, 2020 3:19 AM
To: wdmaudiodev@xxxxxxxxxxxxx <wdmaudiodev@xxxxxxxxxxxxx>
Subject: [EXTERNAL] [wdmaudiodev] Re: Has anyone ever written a hardware 
keyword spotter driver?


Thank you for the response.  t was very helpful.  Is it alright if I ask you 
about any other questions that I may have?



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10



From: Gary Daniels<mailto:dmarc-noreply@xxxxxxxxxxxxx>
Sent: Thursday, January 9, 2020 3:44 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Has anyone ever written a hardware keyword spotter 
driver?



The current version of sysvad implements both single agent (SVA) hardware 
keyword spotter and multiple agent (MVA) hardware keyword spotter. The only 
agent supported through SVA is Cortana. There are many systems in market which 
support SVA, SVA has been available for a few years.



Here is the documentation for SVA and MVA:

https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/voice-activation<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Faudio%2Fvoice-activation&data=02%7C01%7CGary.Daniels%40microsoft.com%7Ca6f26dbe00204b1f2ef208d7968839a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637143384160630607&sdata=ulWvaF3sunRMQkJ2eH4BnO8xwhEyyHr%2Fg%2FX6BCgLQ18%3D&reserved=0>

https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/voice-activation-mva<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Faudio%2Fvoice-activation-mva&data=02%7C01%7CGary.Daniels%40microsoft.com%7Ca6f26dbe00204b1f2ef208d7968839a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637143384160640563&sdata=dExlcdOv48GhRLcn33H0v7sre0OZoLJWXM%2Bpxy0daPA%3D&reserved=0>



MVA is currently under development with targeted partners and is not yet ready 
for broad deployment. Get_SoundDetectorSupportedPatterns2 is used with MVA 
support, Get_SoundDetectorSupportedPatterns is used for SVA support. You're 
seeing Get_SoundDetectorSupportedPatterns2 called, so you're seeing the system 
attempting to use MVA.



If you are interested in learning about development of HWKWS, I would recommend 
commenting out all of the KSPROPSETID_SoundDetector2 entries within the 
SYSVADPROPERTY_ITEM arrays in sysvad. This will remove MVA support from the 
driver, and the system will switch to SVA. SVA is mature, so you will have a 
better development experience.



In the Windows HLK is a test called "VoiceActivationManagerTests". This test 
suite will pass when run with Sysvad, and will exercise all of the HWKWS ddi's, 
SVA and MVA. It's a good place to start learning about the DDI.



You indicate that you are seeing calls to Arm. Arming is the last step of a 
successful initialization of MVA. After the arm, the system is waiting for the 
underlying hardware to report a detection event along with the buffered audio 
containing the keyword phrase and command phrase. The sysvad driver, being a 
sample, does not have any hardware and does not fake having a DSP or generate 
real activations. The driver generates a fake detection event immediately after 
the call to arm, and the burst buffer content is a sine wave. This will never 
trigger the Cortana UI to do anything, the single activation is rejected as a 
false activation because it does not contain someone saying "hey cortana". 
Since you are seeing it arm, it sounds like you're seeing the limits of what 
sysvad does in this situation.



Thanks,

Gary Daniels

Senior SDE, Windows audio





Sent from 
Outlook<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Faka.ms%2Fweboutlook&data=02%7C01%7CGary.Daniels%40microsoft.com%7Ca6f26dbe00204b1f2ef208d7968839a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637143384160640563&sdata=RckIgkwvHFYdEonwiO%2BT3R2gTzNnK10Tsww9ycGImsc%3D&reserved=0>



From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Gordon Lewis <glewis9999@xxxxxxxxxxx>
Sent: Thursday, January 9, 2020 12:12 AM
To: wdmaudiodev@xxxxxxxxxxxxx <wdmaudiodev@xxxxxxxxxxxxx>
Subject: [EXTERNAL] [wdmaudiodev] Has anyone ever written a hardware keyword 
spotter driver?



I know it is relatively new but the sysvad sample driver does include code for 
it.  I see a call to the driver for Get_SoundDetectorPatterns2 for that 
property as well as properties to Arm and Reset the SoundDetector.  I also see 
calls to GetCapabilities and GetCapabilitiesForLanguage in the DLL.  However, I 
never see a call to BuildArmingPatternData in the KeywordDetector DLL.  I am 
wondering if the issue is the ProposedDataFormat properties in the driver or 
not.  I am also wondering if there is a bug in the sample driver.  Any 
assistance would be much appreciated.  I realize the information provided here 
may be vague so I am willing to provide more information as needed.  Thank you.





Sent from 
Mail<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=02%7C01%7CGary.Daniels%40microsoft.com%7Ca6f26dbe00204b1f2ef208d7968839a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637143384160640563&sdata=KQLvhGW8%2B2pWKX4B4jZJv53oNudMx%2BsZQoFuB%2BfYcQw%3D&reserved=0>
 for Windows 10




PNG image

Other related posts: