How do I write a 24-bit WAV file in Python?

前端 未结 7 2214
遇见更好的自我
遇见更好的自我 2020-12-11 02:05

I want to generate a 24-bit WAV-format audio file using Python 2.7 from an array of floating point values between -1 and 1. I can\'t use scipy.io.wavfile.write because it on

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-11 02:12

    Make use of ffmpeg to interchange between wav codecs, below is a sample code

    command = "ffmpeg -i input.wav -ar 22050 output.wav"
    subprocess.call(command, shell=True)
    

提交回复
热议问题