Skip to content

Instantly share code, notes, and snippets.

@utahka
Created December 18, 2015 05:21
Show Gist options
  • Save utahka/07eea1547bf08b540302 to your computer and use it in GitHub Desktop.
Save utahka/07eea1547bf08b540302 to your computer and use it in GitHub Desktop.
extract a "mfcc" with pysptk
#! /usr/bin/env python
import sys
import pysptk
import numpy as np
import scipy.io.wavfile
if __name__ == "__main__":
wav = sys.argv[1]
fs, x = scipy.io.wavfile.read(wav)
x = x.astype(np.float64)
mfcc_arr = pysptk.sptk.mfcc(x, order=12, fs=fs, window_len=2048, frame_len=2048, use_hamming=True)
print(mfcc_arr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment