How to generate audio from a numpy array?

后端 未结 8 919
囚心锁ツ
囚心锁ツ 2020-11-28 04:09

I want to create \"heart rate monitor\" effect from a 2D array in numpy and want the tone to reflect the values in the array.

8条回答
  •  旧时难觅i
    2020-11-28 05:08

    Not sure of the particulars of how you would produce the audio from the array, but I have found mpg321 to be a great command-line audio player, and could potentially work for you.

    I use it as my player of choice for Anki, which is written in python and has libraries that could be a great starting place for interfacing your code/arrays with audio.

    Check out:

    • anki.sound.py
    • customPlayer.py

提交回复
热议问题