Skip to main content

The package for preprocessing wave data

Project description


You can use this for preprocessing wave files.


Please install prowav by using pip.

pip install prowav  


ProWav can calculate mfcc spectrogram and pad for batch execution

from prowav import ProWav  

prowav = ProWav(["path/to/wave/data_1.wav", "path/to/wave/data_2.wav"])  

frame_width = 20 # the length of a frame (ms)
stride_width = 20 # the frame interval (ms)
n_mfcc = 26 # the number of features by mfcc features (If you want to use mfcc preprocessing, you should specify this value)  
mode = 'MFCC'
window_func = 'hamming' # the name for window function
data = prowav.prepro(frame_width=frame_width,stride_width=stride_width,mode=mode,
                                       n_mfcc=n_mfcc, window_func=window_func)
# >> (num_files, num_frames, n_mfcc)    

If you want use fft spectrogram, please specify the mode, "fft".

prowav = ProWav(["path/to/wave/data_1.wav", "path/to/wave/data_2.wav"])
frame_width = 20
stride_width = 20
data = prowav.prepro(frame_width=20,stride_width=20,\
      mode=mode, window_func=window_func)  
# >> (num_files, num_frames, num_features)

You can also use mel-spectrogram. Specify the mode, "mel_spec"

prowav = ProWav(["path/to/wave/data_1.wav", "path/to/wave/data_2.wav"])
frame_width = 50 
stride_width = 50 
n_mfcc = 26
data = prowav.prepro(frame_widh=frame_width, stride_width=stride_width,
                  mode=mode, window_func=window_func, n_mfcc=n_mfcc)

You can use zero-padding or repeat-padding.

prowav = ProWav(["path/to/wave/data_1.wav", "path/to/wave/data_2.wav"])
frame_width = 50 
stride_width = 50 
n_mels = 50
data_zero = prowav.prepro(frame_widh=frame_width, stride_width=stride_width,
                  mode=mode, n_mels=n_mels,window_func=window_func, zero_padding=True) # zero padding 
data_repeat = prowav.prepro(frame_widh=frame_width, stride_width=stride_width,
                  mode=mode, ne_mels=n_mels, window_func=window_func, repeat_padding=True) # repeat padding 

Just loading wave data is possible.

prowav = ProWav(["path/to/wave/data_1.wav", "path/to/wave/data_2.wav"]) 

prowav.load_wav() # loading wav file into this class. # the list of ndarray. Raw data are listed.

You can choose parallel option.


prowav.load_wav(parallel=True, verbose=5)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for prowav, version 0.6
Filename, size File type Python version Upload date Hashes
Filename, size prowav-0.6-py3-none-any.whl (7.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size prowav-0.6.tar.gz (6.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page