Speech output from a microcontroller

I am looking into generating speech output from a small datalogger (approximately match box size). Any advice on how to go about it? There will be a memory card and the words come from a small fixed set, so storage is not a problem.

Way back there was a speech synthesizer for the RCA1802 that only used a single digital output pin, but the sound quality was really not very good. What I'm looking for is something similar, but with a bit higher quality.

I'm planning to use one of ATMega devices, though that probably does not make much difference.

--
Pertti
Reply to
Pertti Kellomäki
Loading thread data ...

The ATMega PWM output at 32kHz sample rate will produce the speech of=20 the reasonably good quality. Especially if you will employ the=20 preemphasis and the noise shaping. The waveforms can be stored in the=20 external flash as is; there is not much sense in using an audio compressi= on.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

n.

Seconding this opinion. I used this approach in a vending machine application, and also a device that needs to enunciate system status. It sounds pretty good with an 8kHz sample rate, 32kHz PWM rate (i.e. reload PWM compare register every 4th sample). 8 bit resolution in my case, and this is stored as 5-bit delta compressed samples [lossless].

Reply to
larwe

Ah, Atmel even has an application note detailing how to do this. Thanks!

--
Pertti
Reply to
Pertti Kellomäki

If it's the app note I'm thinking about (using the ATmega8515 as a voice recorder) it is probably the shittiest code I have ever seen in my life. Run screaming. I had delegated the firmware design for one of my projects to someone else, and found him tearing his hair out trying to solve some problems that were the direct cause of blindly cutting and pasting that code.

Reply to
larwe

larwe wrote

It is app note AVR335, but it does not contain any actual source code, only flow charts. But thanks for the warning.

--
Pertti
Reply to
Pertti Kellomäki

Pertti Kellomäki schrieb:

The source code is in a separate file:

formatting link

lg Stefan

Reply to
Stefan Ernst

In one of the Circuit Cellars there was an article on implimenting sound generation using one or two digital outputs and a simple RC filter on each pin. They used an ATMega8 running at 8 MHz. I built a simple doorbell using this approach and played with all sorts of sound samples. The results were generally quite good.

Regards Anton Erasmus

Reply to
Anton Erasmus

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.