record 5 seconds audio sample and save it to pc

hey all
am new here.
I want to record a 5 seconds audio sample and save it to pc, can this be done? does anyone know how can it be done? will the condenser microphone be able to do the job?

all help will be appreciated. seriously needed

Thanks in advance

hey all
am new here.
I want to record a 5 seconds audio sample and save it to pc, can this be done? does anyone know how can it be done? will the condenser microphone be able to do the job?

all help will be appreciated. seriously needed

Thanks in advance

First of all, why not record it on the PC as it has much better facilities than an Arduino?

Secondly you don't say what "the condenser microphone" is - can you provide a link to its specification?

I suspect the output would need to be amplified before it could be read using the Arduino analogRead()?

However I think the real obstacle is likely to be insufficient memory on the Arduino to save enough data for 5 seconds of sound.

...R

Welcome in Arduino land,

Three questions, three answers,
yes,
yes,
yes, possibly with additional HW

These answers are correct but does not help you any further :frowning:

You need to tell far more about what you want in detail

  • the quality level of the signal you want/expect
  • samples per second
  • bits per sample
  • mono/stereo,

The more you tell about what you want to accomplish (what you tried what worked what not),
the better we can provide answers.

thanks for your fast reply
the idea is that the arduino should record a 5 seconds sample and save it to a file, wav will be ok, so it can be send afterwards to web server

and regarding the mic. http://tinkerlog.com/2007/05/20/cheap-sound-sensor-for-avr/ here how it looks like
i can change it to a better one if u have any suggestions.

waiting for your reply

Please do not cross post - http://forum.arduino.cc/index.php?topic=206178 - that costs everyone extra time.

robtillaart:
Welcome in Arduino land,

Three questions, three answers,
yes,
yes,
yes, possibly with additional HW

These answers are correct but does not help you any further :frowning:

You need to tell far more about what you want in detail

  • the quality level of the signal you want/expect
  • samples per second
  • bits per sample
  • mono/stereo,

The more you tell about what you want to accomplish (what you tried what worked what not),
the better we can provide answers.

The idea to take a sample from song "analog stereo signal" save it to wav file then transmit it to web server. so far i didn't try anything. i have no idea where to start, any ideas?

whippoorwill:
@robtillaart
The idea is using arduino to record 5 seconds sample of song. then transmit it to web-server
so far am in the 1st phase of planning of how to do it. and am still new to arduino so any advise will be appreciated

Then please answer the detailed technical questions I asked before:

You need to tell far more about what you want in detail

  • the quality level of the signal you want/expect
  • samples per second
  • bits per sample
  • mono/stereo,

a new question

  • time distance between recordings

Robin2:
First of all, why not record it on the PC as it has much better facilities than an Arduino?

Secondly you don't say what "the condenser microphone" is - can you provide a link to its specification?

I suspect the output would need to be amplified before it could be read using the Arduino analogRead()?

However I think the real obstacle is likely to be insufficient memory on the Arduino to save enough data for 5 seconds of sound.

...R

The idea is using arduino to record 5 seconds sample of song. then transmit it to web-server
so far am in the 1st phase of planning of how to do it. and am still new to arduino so any advise will be appreciated

robtillaart:

whippoorwill:
@robtillaart
The idea is using arduino to record 5 seconds sample of song. then transmit it to web-server
so far am in the 1st phase of planning of how to do it. and am still new to arduino so any advise will be appreciated

Then please answer the detailed technical questions I asked before:

You need to tell far more about what you want in detail

  • the quality level of the signal you want/expect
  • samples per second
  • bits per sample
  • mono/stereo,

a new question

  • time distance between recordings

the source will be and ipod so it will be transmitting stereo, i don't know how to calculate the sample per second or the bits per sample of a song? if u please can help with that.
the time distance of recordings will be 4 to 5 minutes.

Source iPod, so high audio quality output: 44.1 Kbytes/second
Stereo, 2 channels.
44100 bytes/second x 2 x 60 seconds/minute * 4 minutes = 21,168,000 bytes of storage
Gonna need an SD card.

CrossRoads:
Source iPod, so high audio quality output: 44.1 Kbytes/second
Stereo, 2 channels.
44100 bytes/second x 2 x 60 seconds/minute * 4 minutes = 21,168,000 bytes of storage
Gonna need an SD card.

i will only record for 5 seconds not 4 minutes
another question : can't i just save it directly to pc?
sorry if my questions seem stupid, but am new to arduino and this is my 1st project

sorry if my questions seem stupid, but am new to arduino and this is my 1st project

I suggest you try and learn something about the Arduino before you try your own projects. Do some tutorials.
Do some reading about audio.

You need to sample at twice the rate of the highest frequency you want hear in the result. So if you want to here 5KHz you need to sample at 10,000 times a second. That means for 4 seconds you need a place to put 40,000 samples. Let's assume a sample takes up a byte then that is 40K of memory you need. The Arduino Uno has 2K of memory. Do you see your problem?

A standard Arduino UNO can do max ~8000 10 bit samples per second, leaving no time to store it unless samples are made in async mode.

8000 10 bit samples over 2 channels = 4000 samples per channel 10 bit
IPhone audio = 44100 16 bit samples per second. That is a factor 20 more !

unless this quality level is OK you should look for another 1st project.

whippoorwill:
I want to record a 5 seconds audio sample and save it to pc

How are you going to get it to a PC? The most obvious solution would be to do the recording at the PC - that has the resources needed to do this properly. Is there some reason why you aren't doing that?

Grumpy_Mike:

sorry if my questions seem stupid, but am new to arduino and this is my 1st project

I suggest you try and learn something about the Arduino before you try your own projects. Do some tutorials.
Do some reading about audio.

You need to sample at twice the rate of the highest frequency you want hear in the result. So if you want to here 5KHz you need to sample at 10,000 times a second. That means for 4 seconds you need a place to put 40,000 samples. Let's assume a sample takes up a byte then that is 40K of memory you need. The Arduino Uno has 2K of memory. Do you see your problem?

yes, i understand it now, how about if i used sd shield?

robtillaart:
A standard Arduino UNO can do max ~8000 10 bit samples per second, leaving no time to store it unless samples are made in async mode.

8000 10 bit samples over 2 channels = 4000 samples per channel 10 bit
IPhone audio = 44100 16 bit samples per second. That is a factor 20 more !

unless this quality level is OK you should look for another 1st project.

how about if i added sd shield?

how about if i used sd shield?

The problem is writing to it fast enough but you might be in luck I think there is a library that is optimised for writing audio data to an SD card.
http://code.google.com/p/waverp/

Grumpy_Mike:

how about if i used sd shield?

The problem is writing to it fast enough but you might be in luck I think there is a library that is optimised for writing audio data to an SD card.
http://code.google.com/p/waverp/

how about if i recorded the sample in raw data? then converted it afterwards to html5 or wav

how about if i recorded the sample in raw data?

Makes no odds because a wav format is very close to raw, it just has a header on it.