SpVoice Interface (SAPI 5.3)

HMG en Español

Moderator: Rathinagiri

User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: SpVoice Interface (SAPI 5.3)

Post by danielmaximiliano »

AUGE_OHR wrote: Tue Jan 30, 2024 4:01 am hi Daniel,
p.s. "where" do i get "latest" Source CODE of Harbour ?
under https://sourceforge.net/projects/harbour-project/ i just got "old" Binary Files
ir a https://github.com/harbour/core

seleccionar Download ZIP
Captura de pantalla 2024-01-30 102852.png
Captura de pantalla 2024-01-30 102852.png (2.57 KiB) Viewed 846 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: SpVoice Interface (SAPI 5.3)

Post by danielmaximiliano »

Hola a todos : con la gran ayuda de Antonio Linares para encontrar y corregir el bug en la libreria HBWIN.A se corrigío el problema de seleccionar el Narrador de SapiVoice.
dejo el ejemplo funcional de SapiVoice con la libreria libhbwin.a que se debe copiar en
C:\HMG.3.5\HARBOUR\lib\win\mingw
Captura de pantalla 2024-02-06 173756.png
Captura de pantalla 2024-02-06 173756.png (34.8 KiB) Viewed 669 times
SapiVoice2.rar
(107.65 KiB) Downloaded 36 times
Link de la ayuda https://forums.fivetechsupport.com/view ... 8&start=15
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: SpVoice Interface (SAPI 5.3)

Post by AUGE_OHR »

hi,
i try to fix LIB hbwn.A and want to rebuild it from "Core-Master"
but i got Errors
hbmk2: Compiling...
../../../hbolesrv.c: In function 'hb_dispIdToDynsym':
../../../hbolesrv.c:96:34: error: 'HB_SYMCNT' undeclared (first use in this function)
return hb_dynsymFromNum( ( HB_SYMCNT ) dispid );
^
../../../hbolesrv.c:96:34: note: each undeclared identifier is reported only once for each function it appears in
../../../hbolesrv.c:96:46: error: expected ')' before 'dispid'
return hb_dynsymFromNum( ( HB_SYMCNT ) dispid );
^
../../../hbolesrv.c:99:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
../../../win_osc.c: In function 'HB_FUN_WIN_OSVERSIONINFO':
../../../win_osc.c:201:14: warning: implicit declaration of function 'hb_iswinsp' [-Wimplicit-function-declaration]
if( hb_iswinsp( tmp, HB_TRUE ) )
^
hbmk2[hbwin]: Error: Running C/C++ compiler. 1
did somebody have fix LIB hbwin.A and share it to Community :?:
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: SpVoice Interface (SAPI 5.3)

Post by danielmaximiliano »

Hola Jimmy : simplemente descargar el zip de harbour desde https://github.com/harbour/core/archive ... master.zip
pegar el enlace y se decarga solo.
descomprimir con winrar o winzip en el disco c:\ o c:\Harbour
editar el archivo "C:\Harbour\core-master\contrib\hbwin\olecore.c" y seleccionar desde la linea 2255 a 2258

Code: Select all

lOleError = HB_VTBL( pDisp )->Invoke( HB_THIS_( pDisp ) dispid, HB_ID_REF( IID_NULL ),
                                               LOCALE_USER_DEFAULT,
                                               DISPATCH_PROPERTYPUT, &dispparam,
                                               NULL, &excep, &uiArgErr );
reemplazar por

Code: Select all

lOleError = HB_VTBL(pDisp)->Invoke(HB_THIS_(pDisp) dispid, HB_ID_REF(IID_NULL),
                 LOCALE_USER_DEFAULT,
                 (V_VT(dispparam.rgvarg) == VT_DISPATCH) ? DISPATCH_PROPERTYPUTREF : DISPATCH_PROPERTYPUT,
                 &dispparam, NULL, &excep, &uiArgErr);
sino sobre escribir el el archivo adjunto
hbwin.rar
(205.13 KiB) Downloaded 27 times
abrir la consola CMD

Code: Select all

C:\>cd C:\core-master\contrib\hbwin

C:\core-master\contrib\hbwin>set path=%path%;C:\HMG.3.5\HARBOUR\bin;C:\HMG.3.5\MINGW\bin

C:\core-master\contrib\hbwin>hbmk2 hbwin
copiar la libreria libhbwin.a a C:\HMG.3.5\HARBOUR\lib\win\mingw
sino la libreria esta compilada dentro del ultimo demo que subi solo hay que copiarla a la carpeta C:\HMG.3.5\HARBOUR\lib\win\mingw
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: SpVoice Interface (SAPI 5.3)

Post by AUGE_OHR »

hi Daniel,

Thx, it work fine under HMG v3.5 :D

---

when try to build "Full" LIBs of "Core-Master" these are missing
Verzeichnis von C:\HMG.3.5\HARBOUR\lib\win\mingw

15.11.2020 08:50 53.058 libhbfimage.a
15.11.2020 08:49 60.248 libhbmysql.a
15.11.2020 08:49 73.988 libhbpgsql.a
15.11.2020 08:47 11.382 libsddmy.a
how to get them into "Win-Make" Setup :?:
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: SpVoice Interface (SAPI 5.3)

Post by danielmaximiliano »

AUGE_OHR wrote: Thu Feb 08, 2024 6:24 am 15.11.2020 08:50 53.058 libhbfimage.a
15.11.2020 08:49 60.248 libhbmysql.a
15.11.2020 08:49 73.988 libhbpgsql.a
15.11.2020 08:47 11.382 libsddmy.a
Hola Jimmy:
se debe a la falta de dependencias (En mi caso al intentar compilar individualmente tengo este mensaje

Code: Select all

C:\Harbour\core-master\contrib\hbfimage>set path=%path%;C:\HMG.3.5\HARBOUR\bin;C:\HMG.3.5\MINGW\bin

C:\Harbour\core-master\contrib\hbfimage>hbmk2 hbfimage
hbmk2[hbfimage]: Advertencia: Falta dependencia: freeimage
libhbfimage.a------> https://sourceforge.net/projects/freeim ... rror=sitsa
libhbmysql.a------> https://dev.mysql.com/downloads/
libhbpgsql.a ------> https://www.postgresql.org/
libsddmy.a------> parece ser un parte de libhbmysql.a

sddmy.hbp

Code: Select all

-hblib
-inc

-o${hb_name}

-w3 -es2

rddsql.hbc

-depkeyhead=mysql:mysql.h
-depcontrol=mysql:no{HB_BUILD_3RDEXT='no'}
-depcontrol=mysql:${HB_WITH_MYSQL}
-depincpath=mysql:/usr/include/mysql
-depincpath=mysql:/usr/local/include/mysql
-depincpath=mysql:/opt/local/include/mysql5/mysql
-depimplibs=mysql:../lib/opt/libmySQL.dll
-depimplibs=mysql:../lib/libmySQL.dll

${hb_name}.hbx

core.c
para compilar dependencias debe agregar las variables de entorno que indican donde se encuentran las dependencias de cada contrib

Code: Select all

rem Add these *before* above sample scripts to configure 3rd party dependencies.

set HB_WITH_ADS=C:\ads\acesdk
set HB_WITH_ALLEGRO=C:\allegro\include
set HB_WITH_BLAT=C:\blat\full\source
set HB_WITH_CAIRO=C:\cairo\include\cairo
set HB_WITH_CURL=C:\curl\include
set HB_WITH_FIREBIRD=C:\Firebird\include
set HB_WITH_FREEIMAGE=C:\FreeImage\Dist
set HB_WITH_GD=C:\gd\include
set HB_WITH_MYSQL=C:\mysql\include
set HB_WITH_OCILIB=C:\ocilib\include
set HB_WITH_OPENSSL=C:\openssl\inc32
set HB_WITH_PGSQL=C:\pgsql\include
set HB_WITH_QT=C:\Qt\include
Recuerde que estoy utilizando los binarios HBMK2 en 32 bits y si tiene la necesidad de librerias en 64 bits debe usar Harbour-64 y MinGW-64 dentro de c:\HMG.3.5
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: SpVoice Interface (SAPI 5.3)

Post by danielmaximiliano »

Hola a todos de nuevo:
Comprendiendo SapiVoice de Microsoft encontré que también se puede manejar el audio de salida :D
elimine el GRID e hice una caja de texto para probar los eventos en el motor TTS (esta en etapa de prueba y error )
lo hago en mis tiempos libres para que después se pueda agregar a la aplicación bingo :ugeek:
desde ya gracias por pasar y si hay alguna corrección lo agradeceré
Captura de pantalla 2024-02-09 213316.png
Captura de pantalla 2024-02-09 213316.png (40.41 KiB) Viewed 477 times
[/centre]
SapiVoice2.rar
(108.42 KiB) Downloaded 36 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
mustafa
Posts: 1160
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: SpVoice Interface (SAPI 5.3)

Post by mustafa »

Hola amigo Daniel:
muchas gracias por la aportación
Mustafa
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: SpVoice Interface (SAPI 5.3)

Post by AUGE_OHR »

hi,
i have re-write Fivewin Sample, using RC File, into HMG Syntax

you will find RC File (and Original Source) here
https://forums.fivetechsupport.com/view ... hp?t=12983

Note : Sample CODE need modify hbWin.A as it have a BUG
https://groups.google.com/g/harbour-devel/c/pHb7hOYL35s

---
HMG_SpVoice_WORD.gif
HMG_SpVoice_WORD.gif (129.98 KiB) Viewed 357 times
you can change Voice ( Dblclick im GRID or use Combobox)
it will highlight "Word" which is "spoken"
you also can "Speak from Cursor Position" by press F9
! Note : Voice must "match" Language of Input Text

for more Information read in Fivewin Forum
https://forums.fivetechsupport.com/view ... =3&t=44135
Attachments
SPEAK01.ZIP
need fixed hbWin LIB (HMG 3.5 and above)
(3.74 KiB) Downloaded 28 times
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: SpVoice Interface (SAPI 5.3)

Post by danielmaximiliano »

AUGE_OHR wrote: Mon Feb 12, 2024 7:25 am hi,
i have re-write Fivewin Sample, using RC File, into HMG Syntax
Gracias Jimmy
ah resuelto la forma de iluminar el texto que el motor TTS va reproduciendo en base a

Code: Select all

oSpVoice:__hSink := __axRegisterHandler( oSpVoice:__hObj, { | a, b, c, d, e | OnEvent( a, b, c, d, e ) } )
que es muy efectiva y por fuera de sintaxis de Sapi.Voice :D
en mi caso seguiré viendo ( me falta poco ) para usar la sintaxis del metodo "Status" que devuelve en cada uno de sus propiedades los eventos que presenta Spvoice:Speak
saludos para todos
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply