Muokkaa

Jaa


KSPROPSETID_SoundDetector2

The KSPROPSETID_SoundDetector2 property set contains properties that are used to register a filter for an audio capture device that also supports a detector. The filter has a KS pin factory that has pin category KSNODETYPE_AUDIO_KEYWORDDETECTOR. There cannot be more than one pin factory having this KS pin category in a given KS filter instance.

KSPROPSETID_SoundDetector2 is supported in Windows 10 Version 1903 and later. The KSPROPSETID_SoundDetector2 property set is used to support multiple voice agents. For more information, see Multiple Voice Assistant. KSPROPSETID_SoundDetector property set is used on systems that support just Cortana.

KSPROPSETID_SoundDetector2 uses the KSSOUNDDETECTORPROPERTY structure, instead of a KSPROPERTY:

typedef struct {
    KSPROPERTY  Property;
    GUID        EventId;
} KSSOUNDDETECTORPROPERTY, *PKSSOUNDDETECTORPROPERTY;

All KSPROPSETID_SoundDetector2 properties are called with a KSSOUNDDETECTORPROPERTY data structure. This data structure contains a KSPROPERTY and the event id for the keyword to be armed, reset, detected, etc.

The header file defines the KSPROPSETID_SoundDetector2 property set as follows:

#define STATIC_KSPROPSETID_SoundDetector2\
    0xfe07e322, 0x450c, 0x4bd5, 0x84, 0xca, 0xa9, 0x48, 0x50, 0xe, 0xa6, 0xaa
DEFINE_GUIDSTRUCT("FE07E322-450C-4BD5-84CA-A948500EA6AA", KSPROPSETID_SoundDetector2);

The KSPROPSETID_SoundDetector2 property set contains the following properties:

  • KSPROPERTY_SOUNDDETECTOR_SUPPORTEDPATTERNS - This property is set by the operating system to configure the keywords to be detected.

  • KSPROPERTY_SOUNDDETECTOR_PATTERNS - The driver’s KS filter supports this read/write property. The OS sets this property to configure the keywords to be detected.

  • KSPROPERTY_SOUNDDETECTOR_ARMED - This read/write property is a simply Boolean status indicating whether the detector is armed. The OS sets this to engage the keyword detector. The OS can clear this to disengage. The driver automatically clears this when keyword patterns are set and also after a keyword is detected. (The OS must rearm.)

  • KSPROPERTY_SOUNDDETECTOR_RESET - Reset the detector to an unarmed state with no pattern set.

  • KSPROPERTY_SOUNDDETECTOR_STREAMINGSUPPORT - Future use for voice onset detectors only. Fail this request indicating property not supported or succeed and return true for all other drivers.

At keyword detection time, a PNP notification containing KSNOTIFICATIONID_SoundDetector is sent. NOTE: This is not a KSEvent, but rather a PNP event which is sent, with a payload, via IoReportTargetDeviceChangeAsynchronous.