问题标签 [sox]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
158 浏览

maven - Maven 构建 - SoX / 音频转换

我正在使用 Maven 作为构建工具,并试图将大量手动流程转换为简化的流程。

我有一个 Web 应用程序,它使用当前在部署时通过 SoX 任务运行的音频文件:http ://sox.sourceforge.net/将它们转换为所需的采样率和目标文件夹。(使用 .bat 文件的手动步骤)

是否有将音频构建组件集成到 Maven 构建中的插件或简化方法?

我曾考虑过使用嵌入的 Ant 脚本,但不确定这是否是正确的方向。

干杯

0 投票
3 回答
32224 浏览

audio - 在几毫秒内使用 Sox 修剪音频文件

有没有办法用 SoX 修剪文件的结尾,以毫秒为单位,我试过这个:

但是,它只是说End position is after expected end of audio即使文件实际上很长。

所以我试图让这首歌长 2.000 秒,而不是 2.195 秒,而且,我用 600 多个文件这样做,所以需要从命令行完成。

这是我的警告:

该音频文件用于“00:00:02.19”。

输入命令行的行是:

这是我详细的开始:

0 投票
2 回答
4040 浏览

sox - SoX 如何让混音不降低音量

当我混合四个音轨时,声音会下降很多,我尝试过 mix-volume 和 mix。我怎么做才能使音量不变?

我试过-M after "sox --combine mix-power"了,但最终文件的长度为 0 秒。

0 投票
1 回答
205 浏览

audio - Remove excess samples/sound in a mp3 file

Ive been using SoX to trim files to be exactly 2 seconds long, but ive noticed that audio files always have an extra 32 milliseconds or so on the end, apparently its extra data to tell a different decoder its information, but does it have to add on to the length of the file?

I've created a program that joins together lots of files, 4 times (using "--combine") (Because there are 4 lines of music) then i join those four lines together using --combine mix the length of the song is around 2:35 minutes long, but ive noticed, that the lines that got mixed start to go out of sync, like a time difference, im guessing that its the 37 milliseconds on the end of the file.

Can i fix this or remove the excess time? or maybe im just doing something wrong in my mixing, and that extra length doesn't get joint

0 投票
1 回答
4948 浏览

r - 使用 sox 统计数据批量测量 .wav 文件

我的问题类似于之前关于“get-mean-amplitude-of-wav-from-sox”的问题:

从 sox 获取 .wav 的平均振幅(仅)

我希望能够使用 stats sox 对目录中的 1,000 个 .wav 文件进行批量测量,并将结果存储在数据框或类似的结构中,我可以将其保存为 csv 文本文件。

对于一个声音文件,代码为:

./sox SampleSound.wav -n 统计

导致以下输出:

我想: - 对给定目录中的 1,000 个声音文件进行批量测量, - 捕获列中的统计输出以及所测量的声音文件名, - 并导出以用作 R 分析中的协变量.

谢谢!

马修

0 投票
1 回答
1158 浏览

ffmpeg - 如何将选项从 SoX 传递给 ffmpeg?

我正在尝试将一些文件从 wav 组合并编码为 m4a。我从源代码安装了 ffmpeg 和 sox 以确保没有被禁用。当我使用 ffmpeg 进行转换时

它工作正常。当我使用 SoX

我得到错误

我需要让 SoX 告诉 ffmpeg 可以使用实验性编解码器。

此外,我已经尝试使用本指南http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide来安装 fdk-acc 编码器,但它没有用。实验性的工作正常,所以我宁愿使用它。

0 投票
0 回答
629 浏览

android - 在 android 上使用 SoX

我在android上使用SoX。但是当运行该方法时它无法继续。有人可以帮助我吗?

运行该方法时,它是停止。

0 投票
1 回答
9984 浏览

python - 在 Python 中管道 SoX - 子流程替代方案?

我在应用程序中使用SoX 。该应用程序使用它对音频文件应用各种操作,例如修剪。

这工作正常:

但是,这将导致大文件出现问题,因为read()将完整的文件加载到内存中;这很慢并且可能导致管道的缓冲区溢出。存在一种解决方法:

所以问题如下:除了为 Sox C API 编写 Python 扩展之外,还有其他方法可以替代这种方法吗?

0 投票
2 回答
1183 浏览

audio - 如何将音频扩展到指定长度

我有一堆 wav 文件,我想用静音填充它们以使它们的长度完全相同。理想情况下,我想从命令行执行此操作。

我试过使用 sox 的 pad 命令,但这只会增加固定长度的静音。有什么办法可以让它只是填充固定长度?

0 投票
2 回答
3445 浏览

linux - 多个音频文件的 Sox 和音高变化

我想使用 sox 更改我拥有的每个音乐文件夹中每个 mp3 的音高。我在 bash 中写了这个:

例如,它将音高添加到 01song.mp3,输出文件为 01songPITCHED.mp3。但发生的情况是 sox 第一次完成这项工作,然后再次循环浏览文件夹并将音高添加到已经音高的 mp3-s,因此它们的文件名原来是 01songPITCHEDPITCHED.mp3。当我注意到时我停止了它,所以我不知道它是否会第三次添加音高等等。

为什么以及如何解决这个问题?