Mixing two audio files together with python

前端 未结 6 461
故里飘歌
故里飘歌 2020-12-05 00:41

I have two wav files that I want to mix together to form one wav file. They are both the same samples format etc...

Been searching google endlessly.

I would

6条回答
  •  情深已故
    2020-12-05 01:04

    Try the Echo Nest Remix API:

    from echonest import audio
    from util import *
    
    def mixSound(fname1,fname2,f_out_name):
    
      f1 = audio.AudioData(fnem1)
      f2 = audio.AudioData(fnem2)
    
    
      f_out = audio.mix(f1,f2)
      f_out.encode(foutnem, True)
    

    If it complains about codecs, check https://superuser.com/questions/196857/how-to-install-libmp3lame-for-ffmpeg.

提交回复
热议问题