Merge 2 audio files in sox

馋奶兔 提交于 2019-12-04 12:35:40

问题


I am trying to merge 2 wave files into one file. The 2 files should start playing at the beginning of the new file. Independently of sound length. Running the following command does not give me this result.

  sox -M new_input.wav myrecording.wav output_test.aiff

Are there other ways of achieving this through sox or other command line libraries?


回答1:


just change -M with -m

-M = merge
-m = mix



回答2:


For cases like Calmarius is asking:

sox -m in1.wav in2.wav out.wav trim 0 `soxi -D in1.wav`

this stops at the length of in1.wav, for cases you know the shorter. Otherwise just add a comparator.




回答3:


Heythere. Sorry for late response =) Command should look like this

sox file1 file2 file3

Above will merge first two files and name it after 3rd.

You also might wanna check the docs http://sox.sourceforge.net/sox.html




回答4:


'soxi -D in1.wav' gets the length of the file (in1.wav)



来源:https://stackoverflow.com/questions/9457020/merge-2-audio-files-in-sox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!