다음을 통해 공유


RecognizedAudio.StartTime 속성

정의

인식 작업을 시작할 때 시스템 시간을 가져옵니다.

public:
 property DateTime StartTime { DateTime get(); };
public DateTime StartTime { get; }
member this.StartTime : DateTime
Public ReadOnly Property StartTime As DateTime

속성 값

시스템에서 인식 작업을 시작하는 시간입니다.

예제

다음 예제에서는 처리 합니다 SpeechRecognitionEngine.SpeechRecognized 또는 SpeechRecognizer.SpeechRecognized 이벤트 및 인식 결과와 연결 된 인식된 된 오디오에 대 한 콘솔 정보를 출력 합니다.

// Handle the SpeechRecognized event.
void SpeechRecognizedHandler(object sender, SpeechRecognizedEventArgs e)
{
  if (e.Result == null) return;

  RecognitionResult result = e.Result;

  Console.WriteLine("Grammar({0}): {1}",
    result.Grammar.Name, result.Text);

  if (e.Result.Audio != null)
  {
    RecognizedAudio audio = e.Result.Audio;

    Console.WriteLine("   start time: {0}", audio.StartTime);
    Console.WriteLine("   encoding format: {0}", audio.Format.EncodingFormat);
    Console.WriteLine("   position: {0}, duration: {1}",
      audio.AudioPosition, audio.Duration);
  }

  // Add event handler code here.
}

설명

StartTime 속성 대기 시간 및 성능 계산에 유용할 수 있는 인식 작업을 시작할 때 시스템 시간을 가져옵니다.

AudioPosition 속성 입력된 디바이스의 생성 된 오디오 스트림의 위치를 가져옵니다.

적용 대상

추가 정보