Initializes an RecognizerAudioEvent
with a specified
event identifier. The audioLevel
is set to 0.0.
Parameters:
source - the Recognizer
that issued the event.
id - the identifier for the event type.
Initializes an RecognizerAudioEvent
with a specified
event identifier and audio level. The audioLevel
should be 0.0 for SPEECH_STARTED
and
SPEECH_STOPPED
events.
Parameters:
source - the Recognizer
that issued the event.
id - the identifier for the event type.
audioLevel - the audio level for this event.
Get the audio input level in the range 0 to 1. A value below 0.25
indicates quiet input with 0.0 being silence. A value above 0.75
indicates loud input with 1.0 indicating the maximum level.
The level is provided only for the AUDIO_LEVEL
event
type. The level should be ignored for SPEECH_STARTED
and SPEECH_STOPPED
events.
Return:
the audio input level in the range 0 to 1.
See Also:
AUDIO_LEVEL