SpeechRecognitionEngine.SetInputToWaveStream(Stream) 方法

定义

配置 SpeechRecognitionEngine 对象以接收来自包含波形音频格式 (.wav) 数据的流的输入。Configures the SpeechRecognitionEngine object to receive input from a stream that contains Waveform audio format (.wav) data.

public:
 void SetInputToWaveStream(System::IO::Stream ^ audioSource);
public void SetInputToWaveStream (System.IO.Stream audioSource);
member this.SetInputToWaveStream : System.IO.Stream -> unit
Public Sub SetInputToWaveStream (audioSource As Stream)

参数

audioSource
Stream

包含音频数据的流。The stream containing the audio data.

注解

如果识别器在识别操作期间到达输入流的末尾,则识别操作将使用可用的输入完成。If the recognizer reaches the end of the input stream during a recognition operation, the recognition operation finalizes with the available input. 任何后续的识别操作都可能会生成异常,除非你将输入更新为识别器。Any subsequent recognition operations can generate an exception, unless you update the input to the recognizer.

适用于

另请参阅