![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I am looking for a way to record sounds from my PC to a Wav file and get them to a flash memory IC. I think I can get the data there, but I'm not sure how to play the sound after its on the IC. I don't want to use MP3 because the decoders are expensive and since I wont change the sound very often for my applciation it will be mroe cost effective to use a flash memory chip in place of an MP3 decoder. More memory is much cheaper than the decoder. My plan was to use the standard sound recording tool from the start menu to save a wave file. The data would then be sent to a flash memory IC by USB or serial. A PIC would then play the data when I wanted to play it. Here are the things I'm having trouble with: 1) The data will be in a digital format but I need to change it to analog to connect it to a speaker. Is there a special D/A converter I need for converting a wave file? 2) I read that mono uses a single channel and stero uses multiple channels. Is a channel a seaprate wire between the D/A and the speaker? I would thing this would be done by frquency. I only need the quality of a telephone so I was thinking of using 8-bit mono. Would this be a good choice? 3) Any recommendations for a good D/A converter for stndard audio. 4) Is it vital to use filters? If so, why and what should be filtered? I'm just looking to play back messages similar to the quality of an answering machine so this doesn't have to be anything spectacular as far as sound quality goes. | |
| |
| | (permalink) |
| isd make a chip for this. i have used them before. you need to make a fairly simple peice of hardware to program it though. you just send an analoge signal out of you pc into it and hold down a button while it records then you flip a switch and it plays it back out as an analoge signal. you can make it loop and have differant adressable masseages and stuff too | |
| |
| | (permalink) | |
| Quote:
for the DAC, an R/2R D/A can do the trick.. without any filter, but depensding on the size of your speaker you may need an LM386 audio AMP... | ||
| |
| | (permalink) |
| EPE did just such a project the other year, using a PC to write a WAV file to an EEPROM, and a PIC to play it back - it was called 'Halloween Howler' as it was done for a halloween gag. | |
| |
| | (permalink) |
| Look into 1 bit audio. It is simple to do. You have to do a bit of tweaking to get a reasonable sound. Perhaps this is what Nigel was talking about, not sure. See RomanBlack's page. He has a system that allows you to record the sound on the PC and play it back on a PIC. | |
| |
| | (permalink) | |
| Quote:
I've actually built the EPE project, but not got it finished yet as I haven't sourced the EEPROM yet - I think it was a 24LC512?. | ||
| |
| | (permalink) | |
| Quote:
I picked up a pair of these chips (24LC512) to use with the 1 bit audio. Maybe when I get that breadboarded I will try to see if I can get the howler code to run or maybe not. Just found a pic of the HH which is in the Oct 2005 issue. If you want to build this thing ordering a back issue would be the way to go. In regards to Jonathan app I am sure that the HH would produce better sound. I want to try the 1 bit stuff. Execpt for the eeprom ($2.40 US at mouser) it is free. Could be interesting to have controllers that speak. 3v0 | ||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| How long is the sound sample? Gaston is right ISD make an IC do do this and it's probably the easiest way to do it. There are also cheap recording devices available form electronics stores, you could have a go at taking one to pieces and integrating it into your project.
__________________ I also post at the following sites: http://www.stop-microsoft.org http://www.heated-debates.com Screen name: Aloone_Jonez | |
| |
| | (permalink) |
| The sound sample will be of variable length. If possible, I would like to get it to be at least 5 minutes but maybe up to 20 if possible. The flash memory is pretty cheap and I'll be using low quality audio since it just needs to be the same quality as an answering machine. If I need 64 MB of flash so be it. The sound won't be changed very often so its ok if it takes a long time to download. For the D/A IC I was looking into the analog devices AD7303 8-bit serial converter. It takes data in and outputs it as analog. It looks to me like it will work. I recorded a wav file from the windows recorder tool in the start menu. I selected the option for "telephone quality" and it gave these settings: 11.025 kHz sampling rate 8-bit mono 10 kbs bit rate PCM format So ideally, all I have to do is send the data from the wave file to the d/a converter at a rate of 10kb/s? It seems straight forward but where does the sampling rate come into play? Am I missing something? | |
| |
| | (permalink) | |
| Quote:
You have to send data to the DAC at a rate of 11025 Hz (sampling rate). As each sample consists of 8 bits, you'll be sending 88200 bits per second. Another point: you have to save raw data on the extern memory (without the header of the wav format) If the sound is 5 minutes long, you need about 3.3 Megabytes Last edited by eng1; 30th January 2007 at 10:24 AM. | ||
| |
| | (permalink) |
| The EPE project , as I said, uses a 24LC512 (64kilobytes) - this gives about 6 seconds of audio at 11,025KHz sampling. | |
| |
| | (permalink) |
| This should be very simple to do: Firstly, you record the sound in mono, and make sure it is in PCM (Pulse code modulation - http://en.wikipedia.org/wiki/PCM). You don't need to strip the header, just save the file to an (E)EPROM. The header is so short, It won't be audible. You can get quite big (E)EPROMs. Make a clock source with timing equal to your sampleling rate. Feed the clock to a binary counter. Make sure it matches the address-space in the EEPROM. You can cascade counters easily, a neat little trick. Feed the counter to the (E)EPROM. Feed to output from the (E)EPROM to an 8-bit DAC (linear). But make sure then that you also record with 8-bits. 16-bit DAC you can use with 16-bit recordings. Then amplify the output from the DAC. To reset the playback, simply reset the counter, or kill power to the counter. This will work because of the way PCM works, and the way linears DACs work (http://en.wikipedia.org/wiki/Digital...log_converter). If your interested, you should also have a look at sampling theory. If you need a better sound quality, you need to put in a low-pass filter. Cap at 11250kHz or lower, or what ever you sample at. | |
| |
| | (permalink) |
| 8khz is fine for (answering machine quality) and you can use u-law instead of PCM samples for a major increase in fidelity. Basically u-law uses a log volume scale instead of a linear one like PCM because human ears work on a log scale anyways. Difference encoding can save more space as well, only storing the 4 bit difference between each sample and the last.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | (permalink) |
| Bump Im trying to use RomanBlack's program to make a PIC produce sound.. Does anyone know how you implement the code produced by his program?? The code comes out in 9bits.. but my PICs are all 8bit..
__________________ "Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post 9vDC Guitar Pedal PSU PIC16F84a Game Module | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Sound file | abees81 | Electronic Projects Design/Ideas/Reviews | 11 | 28th August 2006 03:06 PM |
| Sound from a Piezo Transducer | MagnumForce | General Electronics Chat | 5 | 7th October 2005 04:53 PM |
| negative sound | Kane2oo2 | Electronic Projects Design/Ideas/Reviews | 14 | 29th September 2004 02:40 AM |
| how would i generate HEX file for multiple assembly files? | belinda_sg | Micro Controllers | 2 | 30th March 2004 08:54 AM |