Voice SPEAKING

Voice SPEAKING

Postby Jack » Thu Jun 07, 2012 3:57 pm

This code work with XP and NOT with Win 7 64 !

#include "fivewin.ch"

function main()

local oVoice := tOleAuto():New( "Sapi.SPVoice" )
local SSFMCreateForWrite := 1 && 3

oVoice:Speak( "Fivewin for harbour !" )

return .T.

Any idea ?

Thanks
Jack
 
Posts: 288
Joined: Wed Jul 11, 2007 11:06 am

Re: Voice SPEAKING

Postby Rick Lipkin » Thu Jun 07, 2012 7:05 pm

Jack

Is there a .dll file that goes with your code tOleAuto():New( "Sapi.SPVoice" ) ? If yes, perhaps it needs to be registered with Windows 7 ?

Just a quick thought.

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Voice SPEAKING

Postby Jack » Thu Jun 07, 2012 7:13 pm

I do'nt install any DLL .

When i try the program on the same computer in XP Mode with Virtual PC, i hear the string .

I do'nt know what to do !


Thanks for your help .
Jack
 
Posts: 288
Joined: Wed Jul 11, 2007 11:06 am

Re: Voice SPEAKING

Postby Antonio Linares » Wed May 15, 2013 2:34 pm

Here it is working fine on Windows 8 32 bits :-)

Thanks!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Voice SPEAKING

Postby Antonio Linares » Wed May 15, 2013 2:41 pm

Inspecting "SAPI.SPVoice"

STDCALL dispatch FUNC void QueryInterface( [in] PTR, [out] PTR )
STDCALL dispatch FUNC unsigned long AddRef()
STDCALL dispatch FUNC unsigned long Release()
STDCALL dispatch FUNC void GetTypeInfoCount( [out] PTR )
STDCALL dispatch FUNC void GetTypeInfo( [in] unsigned int, [in] unsigned long, [out] PTR )
STDCALL dispatch FUNC void GetIDsOfNames( [in] PTR, [in] PTR, [in] unsigned int, [in] unsigned long, [out] PTR )
STDCALL dispatch FUNC void Invoke( [in] int, [in] PTR, [in] unsigned long, [in] unsigned short, [in] PTR, [out] PTR, [out] PTR, [out] PTR )
STDCALL dispatch PROPERTYGET PTR Status()
STDCALL dispatch PROPERTYGET PTR Voice()
STDCALL dispatch PROPERTYPUTREF void Voice( [in] PTR )
STDCALL dispatch PROPERTYGET PTR AudioOutput()
STDCALL dispatch PROPERTYPUTREF void AudioOutput( [in] PTR )
STDCALL dispatch PROPERTYGET PTR AudioOutputStream()
STDCALL dispatch PROPERTYPUTREF void AudioOutputStream( [in] PTR )
STDCALL dispatch PROPERTYGET int Rate()
STDCALL dispatch PROPERTYPUT void Rate( [in] int )
STDCALL dispatch PROPERTYGET int Volume()
STDCALL dispatch PROPERTYPUT void Volume( [in] int )
STDCALL dispatch PROPERTYPUT void AllowAudioOutputFormatChangesOnNextSet( [in] VARIANT_BOOL )
STDCALL dispatch PROPERTYGET VARIANT_BOOL AllowAudioOutputFormatChangesOnNextSet()
STDCALL dispatch PROPERTYGET USERDEFINED EventInterests()
STDCALL dispatch PROPERTYPUT void EventInterests( [in] USERDEFINED )
STDCALL dispatch PROPERTYPUT void Priority( [in] USERDEFINED )
STDCALL dispatch PROPERTYGET USERDEFINED Priority()
STDCALL dispatch PROPERTYPUT void AlertBoundary( [in] USERDEFINED )
STDCALL dispatch PROPERTYGET USERDEFINED AlertBoundary()
STDCALL dispatch PROPERTYPUT void SynchronousSpeakTimeout( [in] int )
STDCALL dispatch PROPERTYGET int SynchronousSpeakTimeout()
STDCALL dispatch FUNC int Speak( [in] BSTR, [defaultvalue] USERDEFINED )
STDCALL dispatch FUNC int SpeakStream( [in] PTR, [defaultvalue] USERDEFINED )
STDCALL dispatch FUNC void Pause()
STDCALL dispatch FUNC void Resume()
STDCALL dispatch FUNC int Skip( [in] BSTR, [in] int )
STDCALL dispatch FUNC PTR GetVoices( [defaultvalue] BSTR, [defaultvalue] BSTR )
STDCALL dispatch FUNC PTR GetAudioOutputs( [defaultvalue] BSTR, [defaultvalue] BSTR )
STDCALL dispatch FUNC VARIANT_BOOL WaitUntilDone( [in] int )
STDCALL dispatch FUNC int SpeakCompleteEvent()
STDCALL dispatch FUNC VARIANT_BOOL IsUISupported( [in] BSTR, [defaultvalue] PTR )
STDCALL dispatch FUNC void DisplayUI( [in] int, [in] BSTR, [in] BSTR, [defaultvalue] PTR )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Voice SPEAKING

Postby Antonio Linares » Wed May 15, 2013 2:44 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Voice SPEAKING

Postby Francisco Horta » Wed May 15, 2013 9:13 pm

here not working windows 7 64 bits
Regards
Paco
____________________
Paco
Francisco Horta
 
Posts: 845
Joined: Sun Oct 09, 2005 5:36 pm
Location: la laguna, mexico.

Re: Voice SPEAKING

Postby Antonio Linares » Thu May 16, 2013 9:40 am

I have just tested it on Windows 8 64 bits and worked fine.

The only difference with Windows 8 32 bits is that on 64 bits a man talks, and on 32 bits is a lady :-)

Going to try it on Windows 7...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Voice SPEAKING

Postby Silvio.Falconi » Thu May 16, 2013 1:28 pm

Antonio,
this question is an old my question never resolved
I need to made a menu with option sound for a boy at school
On w7 it not run
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Voice SPEAKING

Postby lucasdebeltran » Thu May 16, 2013 1:52 pm

Hello,

In Windows 7 64 bits with BCC this code causes a GPF:

Code: Select all  Expand view
#include "fivewin.ch"


function main()

 local oVoice := tOleAuto():New( "SAPI.SpVoice.1" )
 local SSFMCreateForWrite := 1 && 3

 oVoice:Speak( "Fivewin for harbour !. En Español" )

return .T.



But if I compile with MSVC 2010 runs perfect.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: Voice SPEAKING

Postby Antonio Linares » Thu May 16, 2013 1:53 pm

Silvio,

I just tested it on Windows 7 and it crashes. Its quite difficult to know why, as OLE objects are black boxes, with no source code.

But you could use this solution from your app:
viewtopic.php?f=3&t=26337

using WinExec() or WinRun()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Voice SPEAKING

Postby Antonio Linares » Thu May 16, 2013 1:54 pm

Lucas,

But if I compile with MSVC 2010 runs perfect.


Very interesting observation, thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Voice SPEAKING

Postby Antonio Linares » Thu May 16, 2013 1:56 pm

Lucas,

Please email me your (Microsoft) exe zipped and renamed to zop

I am on my laptop and don't have VS2010 installed yet here
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Voice SPEAKING

Postby lucasdebeltran » Thu May 16, 2013 2:11 pm

Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: Voice SPEAKING

Postby Silvio.Falconi » Thu May 16, 2013 2:26 pm

Antonio,
please can you insert MSVC 2010 on your download list ?
I wish try if with it run
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 94 guests