如何使用 sox 获取所有音频的音频长度?

How to get audio length for all audios using sox?

我可以soxi -d *获取以小时、分钟和秒为单位的音频长度信息。

然而,它只会给我有关个别音频长度的信息。

如果我想查看整个文件夹的音频长度,该如何完成?

就像您执行“wc -w”时一样,它会在末尾显示所有内容的总和。有没有可以与 soxi 集成的标志或其他东西?

soxi -T *

来自 man 文件

-T Used with multiple files; changes the behaviour of -s, -d and -D to display the total across all given files. Note that when used with -s with files > with different sampling rates, this is of questionable value.