Text to Speech on ATtiny24v

Last post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello All,

I've just finshed a project on the ATtiny24v using the PWM as a DAC. Wonderful ! - A very easy device to use. Anyway, the tiny doesn't have enough memory to store a useful amount of audio, but it occured to me that it has enough omph to produce a variable frequency, harmonics and white noise. Spoken English is built up from phonetics, which are (roughly) vowels (swept freq) and constants (band passed white noise). There's (again very roughly) 20 vowels and 24 constants, which is should be possible to generate. (There's other considerations like inconsistancy of pronouciation and things like tempo and stress, but one thing at time). It may, therefore, be possible to write a program to convert ASCII into understandable speech.

Has anyone else actually done anything like this ?

Thoughts, suggestions, ideas, even constructive critism all greatly appreciated

Dren

<º))))><

I am only one lab accident away from becoming a super villain.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I seem to remember Apple and Atari programs that would produce speech through nothing much more than a square wave generator.

So it has definitely been done before, and with tiny resources. The skill will be in parsing the text to produce the right sounds. This could be done by a PC. The Tiny will just play the "notes" from the parsed codes.

You have probably already produced "Greensleeves" on a micro using less than 400 bytes ( including the song ).

You just need a wider range of sounds for each "note".

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cheers Dave. I usually get mine to play some Gary 'musical god' Numan.

I agree with you, I was thinking of programming up a few of the sounds then just sending a code to play them (while I have a bit of free time on the project). The user can then determine what to send, and hopefully it will be recognisable as speech.

Converting normal text into speech will take a lot more work and it will probably screw up a fair bit of the time, ie inconsistant pronouciation like 'ough'. Maybe I'll just get it to say a few choice words or phrases like 'communication connected', 'battery low' or 'danger, DANGER !'

<º))))><

I am only one lab accident away from becoming a super villain.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Those old text to speech programs were pretty small. I am sure you can google for them.

I suspect that modern programs will be far too sophisticated. But I would still assume that they generate note-period tables of some form. You probably just use a subset.

For fixed messages, your Tiny "interpreter" will only be presented with an even smaller subset. I presume that this is how "speaking doll toys" work.

On the music analogy, this effectively what a Midi instrument does.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Look at the datasheet for the SPO256AL2. I used to play around with those back in high school. It used 64 allophones to create any word. It was basically a 2k ROM with a 12 pole digital filter to create PWM output.

http://home.hetnet.nl/~mdr.vd.enden/vp_info/sp0256.pdf

Here's a software emulator for it:

http://www.speechchips.com/shop/item.aspx?itemid=13

If you install the emulator, it has wav files for all of the allophones:
C:\Program Files\ChipTalk\phonemes

How it works:
http://en.wikipedia.org/wiki/Linear_predictive_coding

I like cats, too. Let's exchange recipes.