Pages: [1]   Go Down
Author Topic: Feasibility: Microphone, Speaker, WiFi - Required processor speed  (Read 634 times)
0 Members and 1 Guest are viewing this topic.
South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Those that say it can't be done, shouldn't interrupt those doing it.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm looking at doing something rather simple, but I'm not sure the processor speed will be enough.

Here is what I want to do:

1. Record sound (sentences, not too long, maybe 5 seconds max) - I would like to stream this to the server
2. Send this via WiFi to a server for processing
3. Server streams the result back via WiFi to be played back (max 10 seconds) - As soon as the resulting audio is received it should be played, like streaming audio, 128kb/s quality wav.

The hardware I am looking at is the following:

Main board:
Arduino + WiFi Integrated
http://robotics.org.za/index.php?route=product/product&path=150_156&product_id=571

Microphone:
Breakout, Microphone Electret
http://robotics.org.za/index.php?route=product/product&path=138_186&product_id=445

Speaker:
Standard speaker.

Now to the question, the main board I am looking at has a ATmega328P http://www.atmel.com/devices/atmega328p.aspx processor that runs at max 20 Mhz. Will 20 Mhz be enough to do what I want without the playback (to the server/from the server) stuttering, assuming no network problems?

Thank you in advance,

Donovan
Logged


--

Those that say it can't be done, shouldn't interrupt those doing it.

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 549
Posts: 46125
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1. Record sound (sentences, not too long, maybe 5 seconds max)
Audio quality sound sampling is not something the Arduino is good at.

Quote
I would like to stream this to the server
That will really slow down the rate at which you can sample data. To the point where "forget it" rears it's ugly head.
Logged

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Those that say it can't be done, shouldn't interrupt those doing it.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks!

1. The quality of the audio is not of great importance, I can filter is a bit on the server side, but it needs to be good enough to be able to push through voice recognition (speech-to-text)..

2.
Quote
That will really slow down the rate at which you can sample data. To the point where "forget it" rears it's ugly head.
That is also fine, streaming would be the very best, but I have no problem dropping it and only send the audio after 5 seconds (or some other 'cutoff' parameter)

My other main board option is
Arduino Due
http://robotics.org.za/index.php?route=product/product&path=47_147&product_id=604

It doesn't have WiFi built in, but has a clock speed of 84 Mhz...
Logged


--

Those that say it can't be done, shouldn't interrupt those doing it.

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 549
Posts: 46125
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a tradeoff. Higher sample rates will produce better sounding data. But, you have more data to store, and a limited amount of space to store the data in.

The higher speed DUE would be a better choice, since it also has a lot more SRAM where you would store the sampled data prior to sending it.

128kb per second for 5 seconds is 640k of data. You'll be really hard-pressed to store that in the 2k or SRAM that the 328-based Arduinos have.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11179
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

1. The quality of the audio is not of great importance, I can filter is a bit on the server side, but it needs to be good enough to be able to push through voice recognition (speech-to-text)..

If you want to be able to do speech-to-text then the quality is vitally important. I'm pretty sure that the sampling rate and resolution available from an Arduino will render the speech incomprehensible to any readily available speech recognition software. You might be better off starting with a computer with the processing power to do the voice recognition locally, rather than trying to use an Arduino as a wireless microphone and process the audio remotely.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Those that say it can't be done, shouldn't interrupt those doing it.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Quote
The higher speed DUE would be a better choice, since it also has a lot more SRAM where you would store the sampled data prior to sending it.

Agreed. I was hoping to skip the 'add-wifi-shield' step..

Quote
You might be better off starting with a computer with the processing power to do the voice recognition locally

I was hoping that won't be the end result, but I agree, maybe test the whole system concept first before adding this feature.

Thank for the quick input!
Logged


--

Those that say it can't be done, shouldn't interrupt those doing it.

Land of Oz
Offline Offline
Jr. Member
**
Karma: 3
Posts: 72
I dream in Assembler
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to read the FFT reference in the Library page. I don't know what your Math experience is but its better to understand the background to Fourier transforms before you start doing signal processing. Makes the whole concept much more rewarding.
As someone (sorry, it was you in fact) commented about using the Due, thats exactly the reason why I've just bought some for development. There are a couple of chinese ebayers selling Due boards for a lower price.
« Last Edit: January 24, 2013, 12:31:50 am by greywolf271 » Logged

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Those that say it can't be done, shouldn't interrupt those doing it.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
read the FFT reference in the Library page

Thanks! That is the type of resource I was looking for, but had no idea what to search for! Seems that the Due will be my choice to develop with.

The URLs I found if someone else want to check it out:
FFT http://wiki.openmusiclabs.com/wiki/ArduinoFFT
FHT http://wiki.openmusiclabs.com/wiki/ArduinoFHT
Logged


--

Those that say it can't be done, shouldn't interrupt those doing it.

Land of Oz
Offline Offline
Jr. Member
**
Karma: 3
Posts: 72
I dream in Assembler
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm glad you found that useful.
OML has a great reference on his page to www.alwayslearn.com ;   this guy's explanation is something I wish I had access to when I was studing the math in Fourier transforms years ago.
Again, not trying to teach you how to suck eggs, but if you have'nt used  dspguru, there is a wealth of knowledge on that site..just google it.
Logged

Pages: [1]   Go Up
Jump to: