librosa.util.frame(y, frame_length=2048, hop_length=512)
librosa.filters.mel(sr, n_fft, n_mels=128, fmin=0.0, fmax=None, htk=False)
--
You received this message because you are subscribed to the Google Groups "librosa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to librosa+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/librosa/72c1d8ab-1d1a-4704-94c3-d65f3e88e69c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import librosa
import librosa.display
import numpy as np
import matplotlib.pyplot as plt
audio_path="/Users/carl/Desktop/SA2.WAV"
[y,sr] = librosa.core.load(audio_path,sr=16000)
print y.shape
print sr
specto = librosa.feature.melspectrogram(y, sr=sr, n_fft=400, hop_length=160, n_mels=40)
log_specto = librosa.core.logamplitude(specto)
plt.figure(figsize=(12,4))
librosa.display.specshow(log_specto,sr=sr,x_axis='time', y_axis='mel')
plt.title('mel power spectrogram')
plt.colorbar(format='%+02.0f dB')
plt.tight_layout()
plt.show()
print specto.shape
print log_specto.shapeTo specify the number of bands you can give n_mels=X to melspectrogram() (it'll get passed down to melbands()). The function does frame the signal, and you can control the framing parameters via the n_fft=2048, hop_length=512 arguments to melspectrogram().Cheers
On Mon, Apr 24, 2017 at 9:53 AM, Carlton Banks <nof...@gmail.com> wrote:
What if I want to specify the number of filter bank i want to use?And I guess I have to frame my audio beforehand, this is not done by melspectrogram.
Den 24. apr. 2017 kl. 15.50 skrev Justin Salamon <justin....@nyu.edu>:
Librosa has a built-in melspectrogram function that will take you directly from the audio signal to the mel spectrogram. You'd just have to log scale it, which you can do with logamplitude.Cheers,Justin
On Mon, Apr 24, 2017 at 9:35 AM, Carlton Banks <nof...@gmail.com> wrote:
I am currently trying to extract logged mel filter banks energies from a framed audio signal. As with normal speech speech recognition should the frames be overlapping.Which is libROSA can be done using:librosa.util.frame(y, frame_length=2048, hop_length=512)But how do i extract the logged mel filter banks energies from a framed audio signal. There seem to be a way compute the filters neededlibrosa.filters.mel(sr, n_fft, n_mels=128, fmin=0.0, fmax=None, htk=False)But how do i apply the filters onto the framed audio signal?
--
You received this message because you are subscribed to the Google Groups "librosa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to librosa+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/librosa/72c1d8ab-1d1a-4704-94c3-d65f3e88e69c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Justin Salamon, PhDSenior Research ScientistMusic and Audio Research Laboratory (MARL)& Center for Urban Science and Progress (CUSP)New York University, New York, NY
You received this message because you are subscribed to a topic in the Google Groups "librosa" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/librosa/zAD9-WOm-OE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to librosa+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/librosa/2ccf5663-7393-44cf-ae14-58570054f716%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/librosa/8615e226-7b73-4648-afef-80b3aed4dea4%40googlegroups.com.