This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Perform a DCT | |
from essentia.standard import DCT | |
dct = DCT(inputSize=n_bands, outputSize=13) | |
mfccs = dct(log_mels) | |
plt.bar(np.arange(len(mfccs)), mfccs, align='center') | |
plt.title('Mel-Frequency Cepstrum') | |
plt.xlabel('Cosines') | |
plt.ylabel('Coefficients') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from essentia.standard import MFCC, FrameGenerator | |
mfcc = MFCC(highFrequencyBound=f_high, | |
lowFrequencyBound=f_low, | |
inputSize=1024, | |
numberBands=n_bands, | |
numberCoefficients=13, | |
type='magnitude', | |
sampleRate=44100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Plot MFCCs | |
plt.imshow(mfccs, | |
aspect='auto', | |
origin='lower', | |
interpolation='none', | |
cmap=plt.cm.Blues) | |
plt.title("MFCCs") | |
plt.xlabel("Frames") | |
plt.ylabel("MFCCs") |
OlderNewer