AudioState 열거형
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
음성 인식 엔진에 대한 오디오 입력의 가능한 상태 목록을 포함합니다.
public enum class AudioState
public enum AudioState
type AudioState =
Public Enum AudioState
- 상속
필드
| Name | 값 | Description |
|---|---|---|
| Stopped | 0 | 오디오 입력을 처리하지 않습니다. |
| Silence | 1 | 무음 또는 음성이 아닌 배경 노이즈를 수신합니다. |
| Speech | 2 | 음성 입력을 수신합니다. |
예제
다음 예제에서는 음성 인식기의 변경 오디오 상태를 처리 하는 이벤트 처리기를 보여 줍니다.
private SpeechRecognitionEngine sre;
// Initializes the speech recognition engine.
private void Initialize()
{
sre = new SpeechRecognitionEngine();
// Add a handler for the AudioStateChanged event.
sre.AudioStateChanged += new EventHandler<AudioStateChangedEventArgs>(sre_AudioStateChanged);
// Add other initialization code here.
}
// Handle the AudioStateChanged event.
void sre_AudioStateChanged(object sender, AudioStateChangedEventArgs e)
{
AudioState newState = e.AudioState;
// Handle event here.
}
설명
및 SpeechRecognitionEngine.AudioState 속성을 사용하여 음성 인식 엔진 SpeechRecognizer.AudioState 의 오디오 입력 상태를 가져올 수 있습니다. SpeechRecognitionEngine.AudioStateChanged 및 SpeechRecognizer.AudioStateChanged 이벤트는 음성 인식 엔진의 오디오 입력 상태가 변경될 때 발생합니다.