pcbway




Speech Recognition in MATLAB using correlation,Speech Recognition in MATLAB, correlation in matlab, matlab speech recognitionHello friends, hope you all are fine and having fun with your lives. Today, I am going to share a tutorial on Speech Recognition in MATLAB using Correlation. Speech recognition is used in almost every security project where you need to speak and tell your password to computer and is also used for automation. For example, I want to turn my AC on or off using voice commands then I have to use Speech Recognition.I have to make the system recognize that whether I am saying ON or OFF. In short, speech recognition plays a vital role in voice control projects. In today’s post, I am gonna show you How to do Speech Recognition in Matlab and the technique I have used in this project is known as cross correlation. You should also have a look at Eye Ball Detection in MATLAB.

Correlation is normally used in signal processing , where you need to compare two signals and need to find the similarity between them. It is also know as the dot product of those two signals. Correlation has many uses and you can read more about it on its Wiki Page. Corelation is also used for pattern recognition like you want to find some pattern in the signal then you can use Correlation. Anyways, in our project we are using correlation to find similarity between our stored signals and the testing signal. So, let’s get started with Speech Recognition in MATLAB using Correlation.

Speech Recognition in MATLAB using Correlation

  • First of all, download this complete project by clicking the below button:

Download MATLAB Code for Speech Recognition

  • Now in this package you will find nine audio wav files.
  • Five of them are the recorded sounds which are already feed in the MATLAB.
  • Two are test files which will be recognized by the code.
  • The remaining two are success and failure files which will run if you got the recognition or not.
  • Let me explain the code a bit. First of all, what we need to do is to upload the first five training audio files in the software so and then we need to test these fives files with the test files and we need to check which one is a maximum match.
  • Here’s the complete code:

  • Now if you read the code from start then you can see, first of all, I uploaded the test file which I want to compare with my samples.
  • After that I uploade dall the 5 samples and also get their correlation with the test sample.
  • Finally at the end I compared the results and on the basis of it I figured out which one is correct speech file.
  • You will also get spectrum graphs of your sound files as shown in below figure:

Speech Recognition in MATLAB using correlation,Speech Recognition in MATLAB, correlation in matlab, matlab speech recognition




  • It was quite an easy project and I have done it like within half an hour and I hope you guys will understand it.
  • If you got any problem then ask in comments and I will resolve them.
  • Here’s the complete video demonstration for this project and I hope its gonna help you out in understanding it.


That’s all for today, and I think you have understood How to do Speech Recognition in MATLAB using Correlation. Will meet you guys in the next tutorial soon .Till then take care !!! 🙂

16 Comments

  1. Dear sir i am getting problem in comping the speech recognition code kindly resolve it sir

    ??? Undefined function or variable ‘x’.

    ??? Error using ==> run at 56
    Input argument “filename” is undefined.

  2. I also got this error. Please help me in this matter.
    Error in ==> speechrecognition at 5
    voice=wavread(filename);
    how to rectify this

  3. The denied code is not working. When I give a file not part of test file, the denied line 88, getting ‘too many output arguments’ as error. Can you please explain that part?

  4. soundsc(wavread(‘denied.wav’),50000)
    i want to know that what is 50000 ????? if it is sample rate then how it is same?? plz help men i am working on speech to text recognition anybody wants to help me?

  5. Dear sir,i got an error regarding speech recognition using correlation.Would you please help me out?
    Error in ==> speechrecognition at 5
    voice=wavread(filename)

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment