9 years, 9 months ago.

How do save an audio file on LPC1768

Are there any tutorials on how to create and save a short audio file onto an LPC 1768 to be played when it receives an input?

When you say audio files, do you mean mp3?

posted by Paul Staron 20 Feb 2015

Hi Paul. Any kind the simpler the better the file I have recorded is 172KB

posted by John O Loughlin 20 Feb 2015

1 Answer

9 years, 9 months ago.

I use .wav files , a SD card , the DAC of the LPC1768 and a earphone. I shall add amplifier for a little speaker
The wav files are recorded with Audacity and resampled to 16 bits, mono 16kHz.
Another solution is http://www2.research.att.com/~ttsweb/tts/demo.php
The sound files are stored on a SD card, because the LocalFileSystem is too slow and inhibits the interrupts.
If you want to store the files in the flash memory...look at IAPhttp://developer.mbed.org/cookbook/Homepage
The wav file player I use is here :http://developer.mbed.org/users/sravet/code/wave_player/ I tested a LM386 as amplifier , this was too noisy on my pcb. I am lloking at a TDA7052A.
I hope this can help you.

Accepted Answer

Thanks for your time Robert

posted by John O Loughlin 21 Feb 2015

I would like to know if it's possible to do the same in c code, not c++?

posted by Charly Madengue 04 Feb 2016

yes - you can easily rewrite the wave_player for c

posted by Robert Spilleboudt 04 Feb 2016