Vb.net WAV录制 - 背景噪音 [英] Vb.net WAV recording - background noise

查看:92
本文介绍了Vb.net WAV录制 - 背景噪音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我正在vb.net应用程序中录制WAV音频片段。除了嘶嘶声的背景噪音外,一切似乎都能正常工作。我在Audacity上试过这个,声音很完美。有没有办法过滤掉这个?或者,有没有更好的方法来记录WAV?



谢谢

John

 Dim i As Integer 
i = mciSendString (打开新类型waveaudio alias capture,Nothing,0,0)
i = mciSendString(record capture,Nothing,0,0)
txtStatus.Text =Recording
btnStopRecording .Enabled = True
Me.Cursor = Cursors.Default
Catch ex As Exception
MessageBox.Show(ex.Message,AppName,MessageBoxButtons.OK,MessageBoxIcon.Information)
AudioResponse (7)
结束尝试

btnStopRecording.Enabled = True
End Sub

Private Sub btnStopRecording_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)处理btnStopRecording.Click
尝试
Dim i As Integer
i = mciSendString(save capture& CommonAudioPath,,0,0)
i = mciSendString( close capture,Nothing,0,0)
txtStatus.Text =Idle
Catch ex As Exception
MessageBox.Show(ex.Message,AppName,MessageBoxButtons.OK,MessageBoxIcon.Error)
AudioResponse(7)
结束尝试





我尝试过的事情:



我在没有找到解决方案的情况下搜索了互联网。我的音频知识相当渺茫。

解决方案

也许您需要设置其他参数,如采样率,请参阅:

音频录音机 - 选择录音设备 - VB.Net - 堆栈溢出 [ ^ ]

这是C#中一个有趣的项目: PVS.AVPlayer - MCI录音机 [ ^ ]

Hi. I am recording WAV audio clips in a vb.net application. Everything seems to work fine with exception of a hissing background noise. I have tried this on Audacity and the sound was perfect. Is there any way of filtering this out? Or, is there a better way to record WAV?

Thanks
John

     Dim i As Integer
        i = mciSendString("open new type waveaudio alias capture", Nothing, 0, 0)
        i = mciSendString("record capture", Nothing, 0, 0)
        txtStatus.Text = "Recording"
        btnStopRecording.Enabled = True
        Me.Cursor = Cursors.Default
    Catch ex As Exception
        MessageBox.Show(ex.Message, AppName, MessageBoxButtons.OK, MessageBoxIcon.Information)
        AudioResponse(7)
    End Try

    btnStopRecording.Enabled = True
End Sub

Private Sub btnStopRecording_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStopRecording.Click
     Try
        Dim i As Integer
        i = mciSendString("save capture " & CommonAudioPath, "", 0, 0)
        i = mciSendString("close capture", Nothing, 0, 0)
        txtStatus.Text = "Idle"
    Catch ex As Exception
        MessageBox.Show(ex.Message, AppName, MessageBoxButtons.OK, MessageBoxIcon.Error)
        AudioResponse(7)
    End Try



What I have tried:

I have searched the internet without finding a solution. My audio knowledge is pretty slim.

解决方案

Maybe you need to set additional parameters like the sample rate, see:
Audio Recorder - Select Recording Device - VB.Net - Stack Overflow[^]
Here is an interesting project in C#: PVS.AVPlayer - MCI Sound Recorder[^]


这篇关于Vb.net WAV录制 - 背景噪音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆