Mero euta project is about 'Speech Synthesis'..... ahile converting typed numbers from text to speech, I used VC++ and it was perfect, I could play the sounds perfectly. Aba next step is to make it work over network, need to use client/server application.. C++ ma garho huncha bhanera I'm trying to change it into Java so that I can use COBRA, tara Java ma ke when I play the sound, all the numbers overlap for example when I enter '123'.. instead of saying ' One hundred twenty three' sabai number ekai choti pronounce garcha.... yo problem kasari solve garney ? How to use delay or thread or whatever to remove this overlapping ??
Anyone please ??
Thanks!
SMSainju
Posted
on 26-Nov-02 07:18 AM
If I understood correctly, 123 = "one two three" instread of "one hunderd twenty three"
I did not understand what you meant by "all numbers overlap". If my guess above is correct, then the solution to such problem can be corrected using a HASH table.
123 = 100 + 20+3
Write a subroutine to parse the number to get the above result. this is fairly easy. For each index store the voice in the table as a subsequent value ("myvoice.avi" or etc)
for(i=0; i // for numbers between 11 and 19 you may have to do few other things to make it work // in this case indices = 100, 20, and 3 play play->VOICE[index]; }
I hope this makes sense..
SMSainju
SMSainju
Posted
on 26-Nov-02 07:20 AM
Sorry did not print all correctly
for(i=0;i //do something for numbers between 11 and 19 play play->voice[index] // index = 100, 20, 3 }
SMSainju
SMSainju
Posted
on 26-Nov-02 07:21 AM
Stil did not print everything correctly.
Don't know what the problem with the CFM. Maybe Administrator can help on this.....
SMSainju
san
Posted
on 26-Nov-02 09:10 AM
Hi SMS, whenever you use < the browser will try to resolve the enclosed text as a TAG, hence instead of typing < or > type in the following without the spaces: for < type "& l t ;" for > type "& g t ;"
Regards
san
Posted
on 26-Nov-02 09:14 AM
for(i=0;i < strlen(convert_to_string(number));i++){ //do something for numbers between 11 and 19 play play- > voice[index] // index = 100, 20, 3 }}
Parewa
Posted
on 27-Nov-02 05:05 AM
SMSainju, san,
Thanks a lot for your replies and attempts to help me.
Maybe I didn't explain my problem properly. Let me try once again.
I have already recorded the numbers as '.wav' files. For example: '1' = 'one.wav' '15' = 'fifteen.wav' '30' = 'thirty.wav' and so on...
When I enter any random numbers like ' 8597' it should pronounce as ' eight thousand five hundred ninety seven' .... well it does pronounce the numbers correctly tara sabai number ekkai choti pronounce garcha ... bhannale instead of saying 'eight'..*pause*..'thousand'..*pause*..'five'... blah blah.....it plays 'eight' & 'thousand' & 'five' & 'hundred' & ' ninety' & 'seven' AT THE SAME TIME.....and thus the sound 'overlaps' each other.
Can you help me how to put that *pause* between those numbers while pronouncing it ?
I hope my question makes sense!!
Somebody told me I need to use the 'sleep' thread.. something like while playing one thread make the other one sleep or something like that. I have no idea how to do that! Yesso maddat pauna Java experts haru bata plz!!
Thanks!
dawn
Posted
on 27-Nov-02 07:54 AM
I still have a problem to undertand your need. But using sleep in java is straight forward. Since Sleep is a static method,you don't need construct any class. All you need is to call a method Thread.sleep(
ThunderStorm
Posted
on 27-Nov-02 08:59 AM
Hi Parewa, I got your requirement. You already have coded to parse the number and pronounce it accordingly. But you have not introduced any delay between the consecutive number "Prononciation". So all you need to do is use the Thread.sleep method.
Here is the pseudo code for that....
Thread t=new Thread(); REPEAT FOR ALL INDICES PlayNumber.playnumber(index); t.sleep(500); //argument in milliseconds...hence here is 0.5 second pause. CONTINUE
I hope it will help you.
--THUNDER--
Biruwa
Posted
on 27-Nov-02 09:33 AM
Parewa,
If you post your code, then may be we can see where the error is!
Biruwa, the Plant
Parewa
Posted
on 28-Nov-02 04:48 AM
Hey Thanks again sabai jana.
ThunderStorm,Dawn, I'll try your codes.... kehi pragati bhayena bhaney I'll post my codes as Biruwa ji suggested.