0
我想转换为使用n音讯一个PCM 8位8千赫单声道文件,以DSP TRUESPEECH 1位8千赫单声道,而且我得到以下错误:如何使用PCM音频转换为TRUESPEECH n音讯
第一次机会NAudio.dll中发生类型'NAudio.MmException'异常 AcmNotPossible acmStreamOpen
我明白,可能存在一个我缺少的中间步骤 - 任何见解都将不胜感激。这里是我使用的代码:
WaveFormat outWaveFormat;
outWaveFormat = new TrueSpeechWaveFormat();
Debug.Print("Sample Rate: " + outWaveFormat.SampleRate); //displays "8000"
Debug.Print("Bit Rate: " + outWaveFormat.BitsPerSample); //displays "1"
FileInfo f = new FileInfo(inputFile);
String outputFileName = this.txtDest.Text + @"\" + f.Name;
using (WaveFileReader reader = new WaveFileReader(inputFile))
{
try
{
using (WaveStream convertedStream = new WaveFormatConversionStream (outWaveFormat, reader))
{
WaveFileWriter.CreateWaveFile(outputFileName, convertedStream);
}
}
catch (Exception ex)
{
Debug.Print(ex.Message);
}
}
非常感谢您的回复。我看到DSP Group TrueSpeech编解码器没有显示在可用编解码器列表中。我认为它已经安装好了,但我想我所安装的只是读取/播放DSP文件,而不是创建它们?那可能吗?任何想法,我可以获得编码器?我做了几次网络搜索,并没有提供任何内容。 – user1284603 2012-03-27 18:08:52