您的位置:首页 > 其它

directshow学习之语音程序有待增强的地方

2010-06-07 08:23 302 查看
1。 语言聊天时的噪音过滤 noise suppression ,Acoustic echo cancellation ?

我现在这个程序好像噪音很大的, 还有点回音,特别是声音放大之后。一直想找一个免费的filter能出过滤一下就不错了。可是

就是找不到,DMO下面有两个microsoft noise suppression 和system noise suppression
filter,我在graphedit里面试了一下不过都不能正常

工作,不知道是不是什么设置不对。我看了网上的资料,只有msdn上一个blog里面提到vista里面的功能使用,也不详细,没有这个的资料没法用了。

网上也有看到有些库,不过都是要钱的。有的资料说是人声频率比较低,可以通过这个特点来过滤噪音,我参考kmplayer里面用法,把很多高频的声音截取

不过还是不能过滤掉杂音,反倒是人声有点变调了。谁知道有什么简便的方法可以做到的也可以告诉我吧。

网上抄的一些说明:

Directshow Noise Suppression Filter ( DMO type ).

Input and output of each filter has two types ( 8Khz, 16bit, mono PCM
and 16KHz, 16bit, mono PCM ).

The noise suppression function removes noise from a 10 ms block of
16-bit speech data sampled at 8 kHz. This function is primarily a
Frequency Domain algorithm in which a Fast Fourier Transform (FFT) is
performed on each 10 ms block of data to analyze the frequency
components of the signal. Thereafter, a Voice Activity Detection (VAD)
algorithm is used to determine if the signal segment is speech or noise.
The noise suppression algorithm maintains a profile of the noise and
updates it every time a noise segment is detected by the VAD. Every
frequency band of the input signal is then scaled according to the
proportion of noise contained in that frequency band, thereby causing a
significant degree of noise suppression in the resultant signal. The
Algorithm thus adapts to changes in the nature and level of noise and
does not require a separate noise reference input.

2. 静音抑制 voice-activity-detection

就是聊天时,如果一方不说话,就是没有声音的话,就可以免去发送rtp数据包了。这样可以节省很多带宽,因为很多时候人都是不说话的。

这个也没发现有什么样的库,vista里的noise suppression 说是带了的,也没法测试。不过自己写代码检查audio
capture出来的pcm音频数据,应该也不是很复杂吧。

pcm数据结构应该还是很简单的。没有实现这个功能。

3. rtcp包的处理。

我偷工减料没有做这个了,其实应该是可以通过处理这个包来控制音频的属性的。比如网络负担比较重的时候可以调整把音频压缩率调大一点。播放时动态控制音频
属性等。

我现在是把编码固定为mp3了,其实通过rtcp包控制来设置不同pcm,wma等等都是可以实现的。写起来代码也不会很复杂吧,就是有点繁琐。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: