将原来的路径改成dlg.FileName就可以了吧。
Dim yy As WinForm.ListBox = e.Form.Controls("ListBox1")
Dim sp As New DotNetSpeech.SpVoice()
Dim vl As String = e.Form.Controls("txtContent").Value '获得要朗读的文本
sp.Rate = e.Form.Controls("boxSpeed").Value '设置语速
sp.Voice = sp.GetVoices(String.Empty,String.Empty).Item(yy.SelectedIndex) '选择语音库
Dim Stream As new DotNetSpeech.SpFileStreamClass()
Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog
dlg.Filter= "wav|*.wav" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Stream.Open(dlg.FileName, DotNetSpeech.SpeechStreamFileMode.SSFMCreateForWrite, False)
End If
sp.AudioOutputStream = Stream
sp.Speak(vl,DotNetSpeech.SpeechVoiceSpeakFlags.SVSFDefault)
Stream.Close()