SpeechRecognitionEngine.AudioFormat SpeechRecognitionEngine.AudioFormat SpeechRecognitionEngine.AudioFormat SpeechRecognitionEngine.AudioFormat Property

定義

SpeechRecognitionEngine によって受け取られるオーディオの形式を取得します。Gets the format of the audio being received by the SpeechRecognitionEngine.

public:
 property System::Speech::AudioFormat::SpeechAudioFormatInfo ^ AudioFormat { System::Speech::AudioFormat::SpeechAudioFormatInfo ^ get(); };
public System.Speech.AudioFormat.SpeechAudioFormatInfo AudioFormat { get; }
member this.AudioFormat : System.Speech.AudioFormat.SpeechAudioFormatInfo
Public ReadOnly Property AudioFormat As SpeechAudioFormatInfo

プロパティ値

SpeechRecognitionEngine インスタンスへの入力時のオーディオの形式、または入力が構成されていないか null 入力に設定されている場合は nullThe format of audio at the input to the SpeechRecognitionEngine instance, or null if the input is not configured or set to the null input.

使用して次の例AudioFormatを取得し、オーディオ形式のデータを表示します。The example below uses AudioFormat to obtain and display audio format data.

static void DisplayAudioDeviceFormat(Label label, SpeechRecognitionEngine recognitionEngine)   
{  

  if (recognitionEngine != null && label != null)   
  {  
    label.Text = String.Format("Encoding Format:         {0}\n" +  
          "AverageBytesPerSecond    {1}\n" +  
          "BitsPerSample            {2}\n" +  
          "BlockAlign               {3}\n" +  
          "ChannelCount             {4}\n" +  
          "SamplesPerSecond         {5}",  
          recognitionEngine.AudioFormat.EncodingFormat.ToString(),  
          recognitionEngine.AudioFormat.AverageBytesPerSecond,  
          recognitionEngine.AudioFormat.BitsPerSample,  
          recognitionEngine.AudioFormat.BlockAlign,  
          recognitionEngine.AudioFormat.ChannelCount,  
          recognitionEngine.AudioFormat.SamplesPerSecond);  
    }  
  }  
}  

注釈

オーディオの入力を構成するには、次のいずれかを使用します。To configure the audio input, use one of the following methods:

適用対象

こちらもご覧ください