gammatone icon indicating copy to clipboard operation
gammatone copied to clipboard

Example!!

Open Valentjno opened this issue 4 years ago • 3 comments

I can have an example of Gamma tone gram generation written in Python? image

Valentjno avatar Oct 06 '20 10:10 Valentjno

It depends on what exactly you need. In the readme file it shows how you can do it from the command line with:

python -m gammatone FurElise.wav -d 10

All this does is call render_audio_from_file. Does that answer your question?

detly avatar Oct 06 '20 11:10 detly

Thank you! But in this case in the method "render_audio_from_file" the "function" parameter is just: -> function = gammatone.gtgram.gtgram ? Is there any parameter that escapes me?

Valentjno avatar Oct 06 '20 12:10 Valentjno

-> function = gammatone.gtgram.gtgram ?

This parameter is the function used to create the gammatone spectrogram, it can be either:

  • gammatone.gtgram.gtgram - the slower but more accurate method that uses a full gammatone filterbank
  • gammatone.fftweight.fft_gtgram - the faster method (but less precise) that uses weights applied to an FFT

The other parameters are the path to the .wav file and the time in seconds from the start you want to render until.

detly avatar Oct 06 '20 23:10 detly