Skip to content

Instantly share code, notes, and snippets.

@fedden
Created November 19, 2017 23:42
Show Gist options
  • Select an option

  • Save fedden/445137b26930dd80da0d66451b303e61 to your computer and use it in GitHub Desktop.

Select an option

Save fedden/445137b26930dd80da0d66451b303e61 to your computer and use it in GitHub Desktop.
import librosa
sample_rate = 44100
mfcc_size = 13
# Load the audio
pcm_data, _ = librosa.load(file_path)
# Compute a vector of n * 13 mfccs
mfccs = librosa.feature.mfcc(pcm_data,
sample_rate,
n_mfcc=mfcc_size)

ghost commented Dec 9, 2017

Copy link
Copy Markdown

Maybe you should take the _ var for sample_rate instead of manually setting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment