Source language: Translate to:

NUMBER 2 SPEAK

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

NUMBER 2 SPEAK

Postby Nalla » Wed Mar 14, 2007 3:55 pm

Hi everybody,

How to make an application to speak for user input numbers in text field?

For example: I enter numbers like "53781" then the application will respond with audio; "five three seven eight one"

Thanks
Nalla
Nalla
 
Posts: 13
Joined: Thu Aug 18, 2005 4:42 am

Postby Gaev » Wed Mar 14, 2007 4:14 pm

Nalla:

If you have audio files for each number ... e.g. say0.wav, say1.wav,..,say9.wav ... then ...
Code: Select all
StrLen "[myNumber]" "[myNumberLen]"
If "[myNumberLen]" ">" "0"
   Loop "1" "[myNumberLen]" "[thisPosition]"
      SubStr "[myNumber]" "[thisPosition]" "1" "[thisNumber]"
      PlaySoundFile "!say[thisNumber].wav" "Wait"
      Delay "[100]"
   EndLoop
EndIf
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Nalla » Thu Mar 15, 2007 4:05 pm

Hi Gaev
Is it possible to do alphabets in this way?
Thanks for your quick respond and ofcourse excellent code
Nalla
Nalla
 
Posts: 13
Joined: Thu Aug 18, 2005 4:42 am

Postby Gaev » Thu Mar 15, 2007 6:06 pm

Nalla:
Is it possible to do alphabets in this way?

Yes ... as long as you have a .wav file for each letter of the alphabet ... sayA.wav, sayB.wav etc.
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Nalla » Thu Mar 15, 2007 8:07 pm

Hi Gaev,

Yes it is possible!
I have tested it is working fine.

Thanks a lot you are very helpfull

Nalla
Nalla
 
Posts: 13
Joined: Thu Aug 18, 2005 4:42 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: Bing [Bot] and 1 guest