问题描述
目前我正在录制的音频信号与以下规格:
Currently I'm recording an audio signal with following specs:
- 通道:1
- SamplesPerSecond:8000
- BitsPerSample:16
我如何转换这种.WAV文件到如以下规格(纯C#是preferred):
How can I convert this .wav-file to eg following specs (pure c# is preferred):
- 通道:1
- SamplesPerSecond:22050
- BitsPerSample:16
推荐答案
的Windows API(之一)重新采样音频的。这个转换类是pretty简单的设置输入和输出类型,然后按输入数据和输出拉
Windows API (one of) to resample audio is Audio Resampler DSP. This transform class is pretty straightforward to set up input and output types, then push input data and pull output.
您可能会额外处理与从文件中读取和写入到一个新文件(你没有,如果它实际需要在原始描述中,虽然注明)另一项任务。
Another task you would possible deal additionally with is reading from file and writing into a new file (you did not specify if it is actually needed in your original description though).
您可能还需要使用第三方库,如。
You might also want to use third party libraries like NAudio.
另请参阅:
- C# resample audio from 8khz to 44.1/48khz
- Audio DSP in C#
这篇关于我怎么可以重新取样wav文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!