What is the easiest way to read wav-files using Python [summary]?

后端 未结 8 665
夕颜
夕颜 2020-12-09 13:13

I want to use Python to access a wav-file and write its content in a form which allows me to analyze it (let\'s say arrays).

  1. I heard that \"audiolab\" is a sui
8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-09 13:39

    After trying so many things that does not work I used the decode library from Use (Python) Gstreamer to decode audio (to PCM data) and build a function to parse the raw pcm data into a scipy array.

    It's nice and can open any audio file that gstreamer can open: http://gist.github.com/592776 (see Test and the end of the file for usage info)

提交回复
热议问题