Sound generation / synthesis with python?

后端 未结 7 1181
执念已碎
执念已碎 2020-12-02 08:17

Is it possible to get python to generate a simple sound like a sine wave?

Is there a module available for this? If not, how would you go about creating your own?

7条回答
  •  心在旅途
    2020-12-02 08:37

    I found these two python repositories very useful, might wanna have a look at it...

    python https://github.com/JeremyCCHsu/Python-Wrapper-for-World-Vocoder

    ipython : https://timsainb.github.io/spectrograms-mfccs-and-inversion-in-python.html

    [EDIT] As pointed out, here is an explanational of the two links

    python one seems to have an error, but many people were able to make it run, so I'm not sure. ipython worked like a charm, so I hope you can run it.

    Both of the links are supposed to take an audio as an input, preferably .wav file. Featurize it ( USE FFT : 512, step size = 512/8 ) to obtain spectrograms ( you can even visualize it ), it's a 2D matrix, and then train your Machine learning objects or do whatever you want using a matrix that represents the original audio. If you want, at anypoint, what those vectors represent you can resynthesize audio back as well.

提交回复
热议问题