SpeechRecognitionAudioLevelChangedEventArgs class
Bing
The SpeechRecognitionAudioLevelChangedEventArgs class makes the new audio level available to the SpeechRecognizer.AudioLevelChanged event.
The SpeechRecognitionAudioLevelChangedEventArgs class has the following members.
Name | Description |
|---|---|
The current audio level of user speech. |
Example
The following event handler adjusts the opacity of a UI element named VolumeMeter in response to changes in speaking volume.
void SR_AudioLevelChanged(SpeechRecognizer sender, SpeechRecognitionAudioLevelChangedEventArgs args) { var v = args.AudioLevel; if (v > 0) VolumeMeter.Opacity = v / 50; else VolumeMeter.Opacity = Math.Abs((v - 50) / 100); }
Requirements
Minimum Supported Client | Windows 8 |
Required Extensions | Bing.Speech |
Namespace |
Show: