SoX — wav 音訊拼接

最閒的碼農發表於2019-07-01

1.sox 安裝

    mac: brew install sox
    liunx:原始碼下載:https://sourceforge.net/projects/sox/files/sox/
    liunx安裝:
                    1.解壓
                    2./configure
                    3.make & make install

2.python 擴充套件安裝
原始碼下載:https://github.com/chirlu/sox 安裝:python setup.py install
或直接pip install sox
3.音訊拼接

    import sox

    cbn = sox.Combiner()
    data = [filename1,filename2]
    cbn.build(data, new_file, 'concatenate')

終端執行:

            sox --combine concatenate 1.wav 2.wav out.wav

相關文章