SpeechRecognitionEngine.SetInputToAudioStream流实时音频 [英] SpeechRecognitionEngine.SetInputToAudioStream streaming realtime audio
本文介绍了SpeechRecognitionEngine.SetInputToAudioStream流实时音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在.NET 3.5中,
System.Speech.Recognition SpeechRecognitionEngine . SetInputToAudioStream方法似乎不起作用 支持实时输入.
In .NET 3.5,
System.Speech.Recognition SpeechRecognitionEngine.SetInputToAudioStream Method doesn't seem to support real-time input.
推荐答案
John,您好,
Hi John,
您可以使用 waveOutOpen
API
(使用PInvoke)播放原始"歌曲,从流输入中采样数据.使用该API调用系列,您可以打开播放设备,然后将样本缓冲区(每个缓冲区的长度)排队等待播放.
You can use the waveOutOpen
API
(using PInvoke) to play "raw" sample data from streamed input. This family of API calls lets you open a playback device and then queue up sample buffers (of arbitrary length each) for playback.
播放之前,您不需要将接收到的音频块保存到磁盘上-实际上,您不需要
You do not need to save the received audio chunks to disk before playing them - in fact, you don't wantto do this unless you actually want a recording of the audio as well.
这篇关于SpeechRecognitionEngine.SetInputToAudioStream流实时音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文