如何将16位wav转换为原始音频 [英] How to convert 16bit wav to raw audio

查看:937
本文介绍了如何将16位wav转换为原始音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用sox将星号语音邮件转换为原始音频。原始wav的编码信息是PCM S16 LE,所以我想我只能够做 sox msg0000.wav msg0001.raw ,但原始文件从那里是乱码根据VLC,4分钟长,相比6秒的源文件。

I'm trying to use sox to convert asterisk voicemails to raw audio. The encoding information of the original wav is PCM S16 LE, so I thought I would just be able to do sox msg0000.wav msg0001.raw but the raw file from that is garbled and, according to VLC, 4 minutes long, compared to a 6 second source file.

我不知道我会出错,任何人如何转换wav到原料?

I'm not sure where I'm going wrong, anybody how to convert a wav to raw? Preferably using sox, but any commandline solution will do fine.

推荐答案

你确定你的问题是与sox而不是VLC?我也有问题得到VLC播放原始音频。

Are you sure that your problem is with sox and not VLC? I've also had problems getting VLC to play raw audio. There are command-line options but I didn't quite get them to work.

在寻找另一个工具之前,先验证sox是否确实是问题,尝试类似

Before looking for another tool, verify that sox is indeed the problem by trying something like

mplayer -rawaudio samplesize=2:channels=1:rate=8000 -demuxer rawaudio msg0001.raw

此外,sox还可以有其他选项:

Also, sox can be given additional options:

sox msg0000.wav --bits 16 --encoding signed-integer --endian little msg0001.raw

但我怀疑这些是默认设置,因此不需要它们。

But I suspect that these are the default settings, so they shouldn't be needed.

这篇关于如何将16位wav转换为原始音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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