Giter Club home page Giter Club logo

deadsimplespeechrecognizer's Introduction

DeadSimpleSpeechRecognizer

CNN based Minimal model for recognizing word

deadsimplespeechrecognizer's People

Contributors

manashmandal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

deadsimplespeechrecognizer's Issues

what is purpose of `from keras.datasets import mnist` in the ipnb?

I am a new practitioner of speech processing.
i am confused as why you did from keras.datasets import mnist in the .ipynb
when the data we are concerned with is an audio file.

Also if you notice here :
https://blog.manash.me/building-a-dead-simple-word-recognition-engine-using-convnet-in-keras-25e72c19c12b the first three code blocks , i,e

https://gist.githubusercontent.com/manashmndl/e24dbe21f2addc3e02748ec81db27999/raw/fb32fd606ed6f9cd4aed3d4175cadd8652613d70/mfcc.py

https://gist.githubusercontent.com/manashmndl/7662224549b97757f47502577d6a4b5e/raw/bb239ce578bc0436a30dd60e07905d0fe2b2bdba/get_labels.py

are not present in the ipynb here : https://github.com/manashmndl/DeadSimpleSpeechRecognizer/blob/master/SpeechRecognition.ipynb
So, i'm confused how it is still working.

Request you to kindly update the IPYNB to include an end to end tutorial.

Thank you.

regarding `wave, sr = librosa.load(file_path, mono=True, sr=None) wave = wave[::3]`

def wav2mfcc(file_path, max_pad_len=11):
    wave, sr = librosa.load(file_path, mono=True, sr=None)
    wave = wave[::3]
    mfcc = librosa.feature.mfcc(wave, sr=16000)
    pad_width = max_pad_len - mfcc.shape[1]
    mfcc = np.pad(mfcc, pad_width=((0, 0), (0, pad_width)), mode='constant')
    return mfcc

What is significance of
wave, sr = librosa.load(file_path, mono=True, sr=None) wave = wave[::3]

Q1. how does removing mono = true affect the code.
Q2. what is happeniing here : wave = wave[::3

ParameterError: Audio buffer is not Fortran-contiguous. Use numpy.asfortranarray to ensure Fortran contiguity.

Hi,

I try to reproduce and train the NN. However I get the error below. Could you please help?


ParameterError Traceback (most recent call last)
in
3
4 # Save data to array file first
----> 5 save_data_to_array(max_len=feature_dim_2)
6
7 # # Loading train set and test set

/tf/notebooks/voice-assistant/DeadSimpleSpeechRecognizer/preprocess.py in save_data_to_array(path, max_len)
45 wavfiles = [path + label + '/' + wavfile for wavfile in os.listdir(path + '/' + label)]
46 for wavfile in tqdm(wavfiles, "Saving vectors of label - '{}'".format(label)):
---> 47 mfcc = wav2mfcc(wavfile, max_len=max_len)
48 mfcc_vectors.append(mfcc)
49 np.save(label + '.npy', mfcc_vectors)

/tf/notebooks/voice-assistant/DeadSimpleSpeechRecognizer/preprocess.py in wav2mfcc(file_path, max_len)
22 wave, sr = librosa.load(file_path, mono=True, sr=None)
23 wave = wave[::3]
---> 24 mfcc = librosa.feature.mfcc(wave, sr=16000)
25
26 # If maximum length exceeds mfcc lengths then pad the remaining ones

/usr/local/lib/python3.6/dist-packages/librosa/feature/spectral.py in mfcc(y, sr, S, n_mfcc, dct_type, norm, lifter, **kwargs)
1704
1705 if S is None:
-> 1706 S = power_to_db(melspectrogram(y=y, sr=sr, **kwargs))
1707
1708 M = scipy.fftpack.dct(S, axis=0, type=dct_type, norm=norm)[:n_mfcc]

/usr/local/lib/python3.6/dist-packages/librosa/feature/spectral.py in melspectrogram(y, sr, S, n_fft, hop_length, win_length, window, center, pad_mode, power, **kwargs)
1829 S, n_fft = _spectrogram(y=y, S=S, n_fft=n_fft, hop_length=hop_length, power=power,
1830 win_length=win_length, window=window, center=center,
-> 1831 pad_mode=pad_mode)
1832
1833 # Build a Mel filter

/usr/local/lib/python3.6/dist-packages/librosa/core/spectrum.py in _spectrogram(y, S, n_fft, hop_length, power, win_length, window, center, pad_mode)
2528 S = np.abs(stft(y, n_fft=n_fft, hop_length=hop_length,
2529 win_length=win_length, center=center,
-> 2530 window=window, pad_mode=pad_mode))**power
2531
2532 return S, n_fft

/usr/local/lib/python3.6/dist-packages/librosa/core/spectrum.py in stft(y, n_fft, hop_length, win_length, window, center, dtype, pad_mode)
213
214 # Check audio is valid
--> 215 util.valid_audio(y)
216
217 # Pad the time series so that frames are centered

/usr/local/lib/python3.6/dist-packages/librosa/util/utils.py in valid_audio(y, mono)
276
277 if not y.flags["F_CONTIGUOUS"]:
--> 278 raise ParameterError('Audio buffer is not Fortran-contiguous. '
279 'Use numpy.asfortranarray to ensure Fortran contiguity.')
280

ParameterError: Audio buffer is not Fortran-contiguous. Use numpy.asfortranarray to ensure Fortran contiguity.

Binary cross entropy

Thanks for the create code. I am just wondering why you use binary cross entropy loss function in your github code and categorical cross-entropy in your blog post. I have more than 2 categories I wish to classify, and it seems strange to me that you are using binary cross entropy for a classification problem with 3 classes. Can you explain to me why you are using this loss function?

incomplete tutorial

Sir there many missing code in ipynb and there is not complete code on your blog.
Very nice tutorial for read , but hard for me to execute on my end.

Please Please include all steps in ipynb , as many steps missing.
Sincerely thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.