Pages: [1]   Go Down
Author Topic: Voice recorder.  (Read 8850 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to make a recording and playback system.(voice recorder) It should start recording by the sound-signal and record for 3 minutes beginning and ending with a bleep. Its also necessary to have a switch so you can listen back for at least half an hour.
I have been searching quite while how to make this but I get a bit lost in the information and don't know where to start or where to find a similar example. So what components do I need and does someone have some recommendations?

Mijn dank is groot.
AK


Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 634
Posts: 34528
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is because what you ask is impossible on the normal Arduinos. it only 2K of memory you have about enough memory to record about a quarter of a second.

However if you get the new Due this will allow you to record sound but 3 minutes is out of the question again due to lack of memory. Have you worked out how much you need for that?
Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 221
Posts: 13848
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


consider a wave shield like here - http://learn.adafruit.com/wave-shield-voice-changer -
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Québec
Offline Offline
God Member
*****
Karma: 17
Posts: 673
Hey bien!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike, of coarse like most you forget how easy it is to integrate a SDcard to the Arduino. Could people like you stop saying that all complicated task are imposible cause of lack of memory.

Logged

As we fight our way northward into the great unknown, only that one thing remains certain...

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 634
Posts: 34528
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike, of coarse like most you forget how easy it is to integrate a SDcard to the Arduino. Could people like you stop saying that all complicated task are imposible cause of lack of memory.
So you dig up a post that is over nine months old to tell me off?

But it is you that is wrong.

Yes you can integrate a an SD card easily. But can you record 3 minutes of audio on it?
The SD card will require writing to, it can not sustain writing at audio rates and needs buffering. There is a lack of fast access memory to do that buffering.
So let's see what your solution is. I would be interested in seeing your code, unless of course you don't know what you are talking about. In which case an apology is in order.
Logged

Québec
Offline Offline
God Member
*****
Karma: 17
Posts: 673
Hey bien!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Let's do some simple math(Corigé)

Let's say you record at 8bit mono at a frequency of 16 kiloHz. Cause 16 kiloHz, unless you a bat, is a normal hearing/speaking maximum(high pitch)

Well that mean that every second you need 8 bit × 16 kiloHz = 128 kilobitHz AND 128 kilobitHz × (1/1Sec) ÷ 1Hz = 128 kilobit/Sec or if you prefer 16 kilobyte/Sec.

On a Uno you have 32 kilobyte of flash(could do stéreo after all), and according to here: http://en.wikipedia.org/wiki/Flash_memory  A normal writing cycle for flash is 150 kilobyte/Sec, well your buffering point fall apart.

Here http://fr.wikipedia.org/wiki/Carte_SD they say that you can write at 150 kilobyte/Sec to 4 mégabyte/Sec to a SdCard, about 9,375 to 250 time faster then required.

So for a minute of recording you will need 128kilobit/Sec × 60 Sec/1 Minute  = 7,68 mégabit/Minute , so a little less than 1 mégabyte/Minute.

On a SDcard of 4 gigabyte you have 4000 mégabyte. So  4000 mégabyte ÷ 1 mégabyte/1 Minute. That mean, you have pretty much access to 4000 minutes of low quality sound or if you prefer voice recording quality. Since the point of this tread was to make a voice recorder, well...

Finally, for all i know, the Uno is running at 16 mégaHz, so we are way way above the 16 kiloHz required to sample and record, no?

To conclude, the codes already exist and the numbers talk for them self. So since i'm not a arrogant man, i'm not gonna ask for apology. smiley-razz By the way i'm into physic so math is my hobby.
« Last Edit: June 16, 2013, 04:52:55 pm by Frederic_Plante » Logged

As we fight our way northward into the great unknown, only that one thing remains certain...

Québec
Offline Offline
God Member
*****
Karma: 17
Posts: 673
Hey bien!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If i may suggest some suplémentaire documentation about audio sampling:

http://en.wikipedia.org/wiki/Sampling_rate
http://en.wikipedia.org/wiki/Bit_rate#Audio

Here they suggest that 8kHz is sufficient AND 8bit/mono is over killing for voice recording. So any way's, by the end, following the math I proposed up there, you could quadruple the recording time on the SDcard, so about 16000 minutes  on a 4gigbyte SDcard. But at 4bit/mono 8kHz, I suspect that the sound might be very very crappy unless you are a baritone. smiley-wink
« Last Edit: June 16, 2013, 05:05:50 pm by Frederic_Plante » Logged

As we fight our way northward into the great unknown, only that one thing remains certain...

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have gotten it to work last year without any special audio library.  Sampling to RAM is trivial.  The only problem with my code is the skipping when it allocates another cluster on SD card.  This can be overcome with a simple to use library which pre-allocates the clusters.  What's the problem Mike?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try this http://m.instructables.com/id/Arduino-Audio-Input/?ALLSTEPS
Logged

Pages: [1]   Go Up
Jump to: