I would provide a sound signal of about 2-3 seconds to my neural network. I have trained my network with a single word, like if I speak "Hello" the network may tell if "Hello" is spoken or not, but some other word like "World" is spoken, it will say "Hello" is not spoken. I just want classification of sound if its a specific command or word. What is the best way to do this, I am not a that much advanced in DNN, I only know about NN and CNN, I want to know if there is some research paper or tutorial, or need some explanation about the work.


If you have fixed length speech data you can detect the content using only CNN. You can see that problem as a binary classification (1 if the spoken word is correct, 0 otherwise).

But first, you need to make the input length is fixed. For example, you use 2 seconds as the fixed length. If the recorded speech is more than 2 seconds, you need to crop it, and if the recorded speech is less than 2 seconds you can pad it with 0 values.

Next, You can either use raw data (time-domain) or transform your data using some features extractors method (FFT, MFCC, or MFSC). Then, use CNN as you use it to classify the image. You can assume the graphic of the sound wave as a 2D image.

But, If your data have a variety of length, you can combine CNN to detect each phoneme then combine it as a sequence using RNN or HMM. You can read this method also in the mentioned papers.

  • $\begingroup$ Yes, I need to crop, I have thought the sound data in form of a dequeue, I would have a window of 2s, pass this 2 seconds to model, pop from the front of the window a sample, and push the sample recorded at the back and repeat this algorithm $\endgroup$ May 9 '19 at 4:57
  • $\begingroup$ One more thing I want to ask, say for "hello" word recognition, how much dataset size would provide a considerable good accuracy, if you know this. Otherwise i understood the logic, I would read the papers to implement it. Thanks $\endgroup$ May 9 '19 at 4:59
  • 2
    $\begingroup$ yes, you can use your "window" method. if you use small "shift", It would give some variation of your training data. I can't give an exact number, try with a smaller size (~100 samples for each class) and increase it if the accuracy is still small. To improve accuracy you still need to use some data that have similar sound with "hello". $\endgroup$
    – malioboro
    May 9 '19 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.