Thank you very much, Paul and Mike!
Actually, I have already done an algorithm like that on MATLAB, but I cannot use it on this project, not even along with Arduino. It was based on FFT, the user says something, and after some FFT were done on the signal, the peaks of frequency were isolated, then compared with a pattern that MATLAB already knew.
However, since I'm not able to do it using MATLAB, I'm looking for tutorials, examples, etc, that could guide me through this project. How can I say to the board how to start listening to the microphone? Is there a function to do that? How can I store the sound data to be compared to something later? How can I do FFT? Again, what is the correct function to do that? Is there a library I have to install to do what I'm planning to do?
Did you get what I mean? A tutorial for things like that.
I really need help with those topics. In fact, I should have done those questions in first place..
Reply #5 had a link to the FFT library.
It has examples of how to use it.
To start listening you start recording the samples from the analogue input.
You record for the number of samples you want to pass to the FFT.
Then you point the data to the FFT function and do it. The result is that your sample data buffer now contains the FFT of your samples. Typical is 1028 samples so it is not very long.
Grumpy_Mike:
To start listening you start recording the samples from the analogue input.
You record for the number of samples you want to pass to the FFT.
How can I do that?
There is a function to record data in the library on reply #5?
andrecr03:
How can I say to the board how to start listening to the microphone? Is there a function to do that?
Seems you did not read the tutorial PDF I wrote? This is explained in "Part 2-4: Using the Microphone" on page 16.
Ok, maybe reading page 16 is too much work? It's also in the video, starting at 15 minutes and 54 seconds. Here is a direct link that is supposed to start playing the video at 15:54.
Can you at least just click this link and watch the video for a couple minutes? Is that too hard?
How can I do FFT?
Again, also in the tutorial, part 3.2.
Look, if you weren't even able to read page 16 or watch that part of the video, how do you hope to read pages 24 to 29. That's six times as much than reading only page 16.
Seriously, there comes a time when everyone needs to stand on their own 2 feet. This is your moment. Rise up to the challenge. Actually read the answers we're trying to give you. It's perfectly fine to ask more questions, but at the very least, demonstrate in your next question that you at least made even a small effort to read this info.
Also there's something called FHT Data Visualizer in Processing or Pure Data. Install processing and simulate. i dont know whether is that works. because im also trying to analyze frequency spectrum but processing give me bunch of errors. i dont know how to simulate them properly
Earlier, I saw reference to the ArduinoFFT Library.
*** Why can't this be used for Speech Recognition ?
I would like to move this to the ArduinoDue - to improve the Resolution / accuracy.
I have tried the uSpeech code for the Arduino, which seems somewhat accurate (maybe 65%-80%).
But looking over the code, it only uses the sums of the Samples Difference to Calculate vowels ...
pretty accurate for the Alg type !
But, I want better, say reading mixed frequencies (a Vowel normally is a mix of 3 frequencies).
*** Why can't this be used for Speech Recognition ?
Because speech recognition is not easy.
I have tried the uSpeech code for the Arduino, which seems somewhat accurate (maybe 65%-80%).
I doubt it is even that good but even if it is then that is rubbish as regards usability.
say reading mixed frequencies (a Vowel normally is a mix of 3 frequencies).
Recognising is not a simple matter of recognising frequencies. The mix of frequencies constantly changes over the duration of the word, you have to track these changes and match them to a template. This requires lots of memory for the many FFTs you have to take and then lots of memory for the templates to correlate with the input. Also in order not to miss anything you should sample the whole word and then brake it up into small chunks to do the FFTs on.
Sorry to kick this up, but I was doing some research in voice recognition on Arduino like platforms.
Since Paul seemed especially interested I thought I would chime in with something new I came across.
There is a keyword spotting library/demo released for ARM boards (like Due and Teensy).
There is an example for the Freedom K64 from NXP, but I think this might run on a Teensy 3.5 as well (since it also seems to be based on the K64) (in the Deployment folder).
I'm not 100% sure if I will take this road (it merely a concept idea, not a concrete project I'm working on), but I thought at least to share this in this topic.
Commands supported by this build: silence, unknown, yes, no, up, down, left, right, on, off, stop, go