Skip to content

Commit 33870f6

Browse files
committed
2 parents 7875f7d + ab531f1 commit 33870f6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ plt.show()
272272

273273
### mfcc
274274

275-
Compute the mel frequency cepstrum coefficients (MFFCs) using a mel filterbank.
275+
Compute the mel frequency cepstrum coefficients (MFCCs) using a mel filterbank.
276276

277277
```
278278
audio_mfcc = zaf.mfcc(audio_signal, sample_rate, number_filters, number_coefficients)
@@ -316,17 +316,14 @@ audio_mfcc = zaf.mfcc(audio_signal, window_function, step_length, mel_filterbank
316316
audio_dmfcc = np.diff(audio_mfcc, n=1, axis=1)
317317
audio_ddmfcc = np.diff(audio_dmfcc, n=1, axis=1)
318318
319-
# Compute the time resolution for the MFCCs in number of time frames per second (~ sampling frequency for the MFCCs)
320-
time_resolution = sampling_frequency*np.shape(audio_mfcc)[1]/len(audio_signal)
321-
322319
# Display the MFCCs, delta MFCCs, and delta-delta MFCCs in seconds
323320
plt.figure(figsize=(17, 10))
324321
plt.subplot(3, 1, 1)
325-
zaf.mfccshow(audio_mfcc, time_resolution, xtick_step=1), plt.title("MFCCs")
322+
zaf.mfccshow(audio_mfcc, len(audio_signal), sampling_frequency, xtick_step=1), plt.title("MFCCs")
326323
plt.subplot(3, 1, 2)
327-
zaf.mfccshow(audio_dmfcc, time_resolution, xtick_step=1), plt.title("Delta MFCCs")
324+
zaf.mfccshow(audio_dmfcc, len(audio_signal), sampling_frequency, xtick_step=1), plt.title("Delta MFCCs")
328325
plt.subplot(3, 1, 3)
329-
zaf.mfccshow(audio_ddmfcc, time_resolution, xtick_step=1), plt.title("Delta-delta MFCCs")
326+
zaf.mfccshow(audio_ddmfcc, len(audio_signal), sampling_frequency, xtick_step=1), plt.title("Delta-delta MFCCs")
330327
plt.show()
331328
```
332329

0 commit comments

Comments
 (0)