Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Dren
PostPosted: Feb 03, 2009 - 08:15 AM
Hangaround


Joined: Oct 13, 2008
Posts: 357
Location: Europe

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
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Feb 03, 2009 - 09:26 AM
10k+ Postman


Joined: Feb 12, 2005
Posts: 19447
Location: Wormshill, England

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.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Dren
PostPosted: Feb 03, 2009 - 09:39 AM
Hangaround


Joined: Oct 13, 2008
Posts: 357
Location: Europe

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 !'
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Feb 03, 2009 - 10:01 AM
10k+ Postman


Joined: Feb 12, 2005
Posts: 19447
Location: Wormshill, England

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.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
ninevoltz9
PostPosted: Feb 03, 2009 - 01:54 PM
Resident


Joined: Feb 28, 2004
Posts: 979
Location: Ohio

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.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits