Home > Archive > FoxPro Help and Support > May 2005 > ppronounce word









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ppronounce word
bijan

2005-05-14, 9:30 am

hi
i mad a dictionary with visual fox and i want pronounce each word in my
programm.
is there a program i send my word to it and it pronounce my word
i put an command button on my form i want when i seek a word and programe
fint the word i clicke on the command button to pronounce this word
thank you very much
Anders Altberg

2005-05-14, 8:24 pm

There's an ActiveX, Microsoft Speech Object Library, that should be useful.
You can check out the classes and the PEMs in the Object Browser.

oSp=CreateObject('SA
PI.SpLexicon.1')
oSpAudioFormat = Createobject('SAPI.spAudioFormat')
and 25 more classes,

-Anders

"bijan" <bijan@discussions.microsoft.com> wrote in message
news:BB09AC82-9FB3-46AF-8EC6- 82A88A154754@microso
ft.com...
> hi
> i mad a dictionary with visual fox and i want pronounce each word in my
> programm.
> is there a program i send my word to it and it pronounce my word
> i put an command button on my form i want when i seek a word and programe
> fint the word i clicke on the command button to pronounce this word
> thank you very much


bijan

2005-05-15, 3:24 am

i can not find microsoft speech could you axplain more
and could you complet code
what is sapi
thank you

"Anders Altberg" wrote:

> There's an ActiveX, Microsoft Speech Object Library, that should be useful.
> You can check out the classes and the PEMs in the Object Browser.
>
> oSp=CreateObject('SA
PI.SpLexicon.1')
> oSpAudioFormat = Createobject('SAPI.spAudioFormat')
> and 25 more classes,
>
> -Anders
>
> "bijan" <bijan@discussions.microsoft.com> wrote in message
> news:BB09AC82-9FB3-46AF-8EC6- 82A88A154754@microso
ft.com...
>
>

Eric den Doop

2005-05-15, 7:24 am

SAPI is the Speech API. It is available by default on Windows XP and can be
installed on other operating systems. You can download the SDK from
http://www.microsoft.com/speech/default.mspx.

Here's some basic sample code
* load SAPI Engine
loVoiceEngine = CREATEOBJECT("SAPI.SpVoice")
FOR EACH loVoice IN loVoiceEngine.GetVoices
?loVoice.GetDescription()
loVoiceEngine.voice = loVoice
* say something
loVoiceEngine.speak("Hello World")
ENDFOR
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8

"bijan" <bijan@discussions.microsoft.com> wrote in message
news:55C70792-0C59-4051-8370- 700DFFDEC880@microso
ft.com...[color=darkred]
>i can not find microsoft speech could you axplain more
> and could you complet code
> what is sapi
> thank you
>
> "Anders Altberg" wrote:
>


bijan

2005-05-15, 9:23 am

thank you
but could you say how i can pass my word in table to this code for pronounce
and also could explain each line in your code realy i dont undrestant some
line what is doing

"Eric den Doop" wrote:

> SAPI is the Speech API. It is available by default on Windows XP and can be
> installed on other operating systems. You can download the SDK from
> http://www.microsoft.com/speech/default.mspx.
>
> Here's some basic sample code
> * load SAPI Engine
> loVoiceEngine = CREATEOBJECT("SAPI.SpVoice")
> FOR EACH loVoice IN loVoiceEngine.GetVoices
> ?loVoice.GetDescription()
> loVoiceEngine.voice = loVoice
> * say something
> loVoiceEngine.speak("Hello World")
> ENDFOR
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
>
> "bijan" <bijan@discussions.microsoft.com> wrote in message
> news:55C70792-0C59-4051-8370- 700DFFDEC880@microso
ft.com...
>
>
>

Anders Altberg

2005-05-15, 9:23 am

Google for "Microsoft Speech Object"
Check out http://support.microsoft.com/?kbid=287120
-Anders

"bijan" <bijan@discussions.microsoft.com> wrote in message
news:9CE63BDD-815C-4458-B14B- 1D77939F7AC5@microso
ft.com...
> thank you
> but could you say how i can pass my word in table to this code for

pronounce
> and also could explain each line in your code realy i dont undrestant

some[color=darkred]
> line what is doing
>
> "Eric den Doop" wrote:
>
be[color=darkred]
in my[color=darkred]

Andrew R

2005-05-16, 7:25 am

One time offering:-

* load SAPI Engine
{this line is a comment}

loVoiceEngine = CREATEOBJECT("SAPI.SpVoice")
{this line creates the object loVoiceEngine}

FOR EACH loVoice IN loVoiceEngine.GetVoices
{the GetVoices property of the object loVoiceEngine is a collection of
possible 'characters' - so this line begins to loop through the Characters
on your system (different people will have different possibilities) }

?loVoice.GetDescription()
{since we are in the FOR loop each time this line will print out the
Description of this character in the GetVoices collection}

loVoiceEngine.voice = loVoice
{this line assigns (selects) this particular character to be the "voice" by
setting the Voice property of the loVoiceEngine object}

* say something
{another comment}

loVoiceEngine.speak("Hello World")
{the Speak method of the loVoiceEngine object causes the computer to "talk"
in the selected voice the string supplied}

ENDFOR
{the FOR loop continues until the GetVoices collection has been gone through
entirely}

You could use this like this

suppose you have a table:-
WORD.dbf
fields:-
UniqueID Integer
Word String

Records
1 Today
2 Yesterday
3 Begin
4 Happy

After selecting the required Record
Code:-
loVoiceEngine = CREATEOBJECT("SAPI.SpVoice")
loVoiceEngine.voice = loVoiceEngine.GetVoices.Item(0)
loVoiceEngine.Speak(word.word)

Andrew R.



"bijan" <bijan@discussions.microsoft.com> wrote in message
news:9CE63BDD-815C-4458-B14B- 1D77939F7AC5@microso
ft.com...
: thank you
: but could you say how i can pass my word in table to this code for
pronounce
: and also could explain each line in your code realy i dont undrestant
some
: line what is doing
:
: "Eric den Doop" wrote:
:
: > SAPI is the Speech API. It is available by default on Windows XP and can
be
: > installed on other operating systems. You can download the SDK from
: > http://www.microsoft.com/speech/default.mspx.
: >
: > Here's some basic sample code
: > * load SAPI Engine
: > loVoiceEngine = CREATEOBJECT("SAPI.SpVoice")
: > FOR EACH loVoice IN loVoiceEngine.GetVoices
: > ?loVoice.GetDescription()
: > loVoiceEngine.voice = loVoice
: > * say something
: > loVoiceEngine.speak("Hello World")
: > ENDFOR
: > --
: > Eric den Doop
: > www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
: >
: > "bijan" <bijan@discussions.microsoft.com> wrote in message
: > news:55C70792-0C59-4051-8370- 700DFFDEC880@microso
ft.com...
: > >i can not find microsoft speech could you axplain more
: > > and could you complet code
: > > what is sapi
: > > thank you
: > >
: > > "Anders Altberg" wrote:
: > >
: > >> There's an ActiveX, Microsoft Speech Object Library, that should be
: > >> useful.
: > >> You can check out the classes and the PEMs in the Object Browser.
: > >>
: > >> oSp=CreateObject('SA
PI.SpLexicon.1')
: > >> oSpAudioFormat = Createobject('SAPI.spAudioFormat')
: > >> and 25 more classes,
: > >>
: > >> -Anders
: > >>
: > >> "bijan" <bijan@discussions.microsoft.com> wrote in message
: > >> news:BB09AC82-9FB3-46AF-8EC6- 82A88A154754@microso
ft.com...
: > >> > hi
: > >> > i mad a dictionary with visual fox and i want pronounce each word
in my
: > >> > programm.
: > >> > is there a program i send my word to it and it pronounce my word
: > >> > i put an command button on my form i want when i seek a word and
: > >> > programe
: > >> > fint the word i clicke on the command button to pronounce this word
: > >> > thank you very much
: > >>
: > >>
: >
: >
: >


bijan

2005-05-16, 7:25 am

thank you very much
it work very good
but when i put my program on another computer when i click on command button
to pronounce word it pronounce three times with three diffrent voice.
when i see sppech in control panel i saw three voice engin was installed on
my computer
first microsoft sam
second
third
microsoft sam pronounce very bad the word
but LH Michelle pronounce butter,it is near the voice of human
my question is how i can remove speech engin from computer for example
LHMichael
and where i can found a good speech engine to have better pronounce for my
dictionary
thank you again


"Andrew R" wrote:

> One time offering:-
>
> * load SAPI Engine
> {this line is a comment}
>
> loVoiceEngine = CREATEOBJECT("SAPI.SpVoice")
> {this line creates the object loVoiceEngine}
>
> FOR EACH loVoice IN loVoiceEngine.GetVoices
> {the GetVoices property of the object loVoiceEngine is a collection of
> possible 'characters' - so this line begins to loop through the Characters
> on your system (different people will have different possibilities) }
>
> ?loVoice.GetDescription()
> {since we are in the FOR loop each time this line will print out the
> Description of this character in the GetVoices collection}
>
> loVoiceEngine.voice = loVoice
> {this line assigns (selects) this particular character to be the "voice" by
> setting the Voice property of the loVoiceEngine object}
>
> * say something
> {another comment}
>
> loVoiceEngine.speak("Hello World")
> {the Speak method of the loVoiceEngine object causes the computer to "talk"
> in the selected voice the string supplied}
>
> ENDFOR
> {the FOR loop continues until the GetVoices collection has been gone through
> entirely}
>
> You could use this like this
>
> suppose you have a table:-
> WORD.dbf
> fields:-
> UniqueID Integer
> Word String
>
> Records
> 1 Today
> 2 Yesterday
> 3 Begin
> 4 Happy
>
> After selecting the required Record
> Code:-
> loVoiceEngine = CREATEOBJECT("SAPI.SpVoice")
> loVoiceEngine.voice = loVoiceEngine.GetVoices.Item(0)
> loVoiceEngine.Speak(word.word)
>
> Andrew R.
>
>
>
> "bijan" <bijan@discussions.microsoft.com> wrote in message
> news:9CE63BDD-815C-4458-B14B- 1D77939F7AC5@microso
ft.com...
> : thank you
> : but could you say how i can pass my word in table to this code for
> pronounce
> : and also could explain each line in your code realy i dont undrestant
> some
> : line what is doing
> :
> : "Eric den Doop" wrote:
> :
> : > SAPI is the Speech API. It is available by default on Windows XP and can
> be
> : > installed on other operating systems. You can download the SDK from
> : > http://www.microsoft.com/speech/default.mspx.
> : >
> : > Here's some basic sample code
> : > * load SAPI Engine
> : > loVoiceEngine = CREATEOBJECT("SAPI.SpVoice")
> : > FOR EACH loVoice IN loVoiceEngine.GetVoices
> : > ?loVoice.GetDescription()
> : > loVoiceEngine.voice = loVoice
> : > * say something
> : > loVoiceEngine.speak("Hello World")
> : > ENDFOR
> : > --
> : > Eric den Doop
> : > www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
> : >
> : > "bijan" <bijan@discussions.microsoft.com> wrote in message
> : > news:55C70792-0C59-4051-8370- 700DFFDEC880@microso
ft.com...
> : > >i can not find microsoft speech could you axplain more
> : > > and could you complet code
> : > > what is sapi
> : > > thank you
> : > >
> : > > "Anders Altberg" wrote:
> : > >
> : > >> There's an ActiveX, Microsoft Speech Object Library, that should be
> : > >> useful.
> : > >> You can check out the classes and the PEMs in the Object Browser.
> : > >>
> : > >> oSp=CreateObject('SA
PI.SpLexicon.1')
> : > >> oSpAudioFormat = Createobject('SAPI.spAudioFormat')
> : > >> and 25 more classes,
> : > >>
> : > >> -Anders
> : > >>
> : > >> "bijan" <bijan@discussions.microsoft.com> wrote in message
> : > >> news:BB09AC82-9FB3-46AF-8EC6- 82A88A154754@microso
ft.com...
> : > >> > hi
> : > >> > i mad a dictionary with visual fox and i want pronounce each word
> in my
> : > >> > programm.
> : > >> > is there a program i send my word to it and it pronounce my word
> : > >> > i put an command button on my form i want when i seek a word and
> : > >> > programe
> : > >> > fint the word i clicke on the command button to pronounce this word
> : > >> > thank you very much
> : > >>
> : > >>
> : >
> : >
> : >
>
>
>

Anders Altberg

2005-05-16, 11:24 am

Hi Bijan
Here's a tip from Calvin Hsia, chief of programming VFP at Microsoft.

http://blogs.msdn.com/calvin_hsia/a.../16/417728.aspx

-Anders

"bijan" <bijan@discussions.microsoft.com> wrote in message
news:9CE63BDD-815C-4458-B14B- 1D77939F7AC5@microso
ft.com...
> thank you
> but could you say how i can pass my word in table to this code for

pronounce
> and also could explain each line in your code realy i dont undrestant

some
> line what is doing


bijan

2005-05-17, 3:24 am

thank you
anders

"Anders Altberg" wrote:

> Hi Bijan
> Here's a tip from Calvin Hsia, chief of programming VFP at Microsoft.
>
> http://blogs.msdn.com/calvin_hsia/a.../16/417728.aspx
>
> -Anders
>
> "bijan" <bijan@discussions.microsoft.com> wrote in message
> news:9CE63BDD-815C-4458-B14B- 1D77939F7AC5@microso
ft.com...
> pronounce
> some
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com