title: Librosa: Cannot provide window function for mfcc on Windows
body: <p>I'm currently experimenting with librosa to reproduce an scientific approach (deep learning) that used PRAAT to extract the MFCCs of audio files. I'm not that experienced with phonetics/acoustics and I had a lot of issues understanding PRAAT - so I started using librosa whose API was more "accessible" for me.</p>
  
  <p>The paper's authors used a Hamming window in the MFCC calculation and I tried to provide the function as additional parameter in the function call of mfcc or as part of **kwargs as dictionary:</p>
  
  <pre><code>import os
  from scipy.signal import get_window
  from librosa import load, get_duration
  from librosa.feature import mfcc
  import pandas
  import tables
  import matplotlib.pyplot as plt
  
  # ...
  
  kwargs = {"n_fft": 160, "hop_length": 80, "window": get_window("hamming", Nx=160)}
  mfccs = mfcc(y=y, sr=sr, S=None, n_mfcc=12, **kwargs)
  </code></pre>
  
  <p>I still have a lot to learn about acoustics, so I'm not very sure about the values, but (considering the API) this should work. On my Windows computer running this commands in my Anaconda environment causes the following error:</p>
  
  <pre><code>processing  03a01Fa.wav ...
  Traceback (most recent call last):
  File "xxx\librosaData.py", line 37, in &lt;module&gt;
  mfccs = mfcc(y=y, sr=sr, S=None, n_mfcc=12, **kwargs)
  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\xxx\lib\site-packages\librosa\feature\spectral.py", line 1442, in mfcc
  S = power_to_db(melspectrogram(y=y, sr=sr, **kwargs))
  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\xxx\lib\site-packages\librosa\feature\spectral.py", line 1534, in melspectrogram
  mel_basis = filters.mel(sr, n_fft, **kwargs)
  TypeError: mel() got an unexpected keyword argument 'window'
  
  Process finished with exit code 1 
  </code></pre>
  
  <p>I tried this today on MacOS (also using an Anaconda environment) and it's causing no error. Most of the time I'm using the Windows computer for my experiments, because I can accelerate the calculations with CUDA. I'm not sure whether this is an Librosa-related issue, because I already had some other issues with my environments there (e.g. I couldn't persist a pandas.DataFrame using HDF5, but I somehow managed to fix this by myself. And PyCharm on Windows doesn't display my installed packages - not fixed yet, but less important). </p>
  
  <p>I don't know what causes this behavior and I would really like to fix this problem. Did anybody encounter the same (or a similar) problem and found a way to fix it? </p>
  
  <p>Thank you very much. :-)</p>
  
  <p>Edit:
  As suggested in ZF007's answer I tried out to run the following script on (another/my private) Windows Computer:</p>
  
  <pre><code>import librosa
  
  from scipy.signal import get_window
  
  y, sr = librosa.load('audio/01-01-01-01-01-01-01.mp4',)
  meltspec_args = {"n_fft": 160, "hop_length": 80, "window":  get_window("hamming", 160)}
  mfccs = librosa.feature.mfcc(y=y, sr=sr, S=None, n_mfcc=12, **meltspec_args)
  
  print(mfccs.shape)
  </code></pre>
  
  <p>But it still runs into the same error. </p>
  
  <p>Edit2: I created a git repository to share code and configuration (<a href="https://github.com/Keanri828/librosa_mfcc_WindowsError" rel="noreferrer">https://github.com/Keanri828/librosa_mfcc_WindowsError</a>).</p>