Page 2 of 3

Re: SpVoice Interface (SAPI 5.3)

Posted: Tue Jan 30, 2024 1:35 pm
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 1557 times

Re: SpVoice Interface (SAPI 5.3)

Posted: Tue Feb 06, 2024 8:50 pm
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 1380 times
SapiVoice2.rar
(107.65 KiB) Downloaded 99 times
Link de la ayuda https://forums.fivetechsupport.com/view ... 8&start=15

Re: SpVoice Interface (SAPI 5.3)

Posted: Wed Feb 07, 2024 11:44 pm
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 :?:

Re: SpVoice Interface (SAPI 5.3)

Posted: Thu Feb 08, 2024 12:47 am
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 76 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

Re: SpVoice Interface (SAPI 5.3)

Posted: Thu Feb 08, 2024 6:24 am
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 :?:

Re: SpVoice Interface (SAPI 5.3)

Posted: Thu Feb 08, 2024 11:26 am
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

Re: SpVoice Interface (SAPI 5.3)

Posted: Sat Feb 10, 2024 12:47 am
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 1188 times
[/centre]
SapiVoice2.rar
(108.42 KiB) Downloaded 93 times

Re: SpVoice Interface (SAPI 5.3)

Posted: Sun Feb 11, 2024 1:09 pm
by mustafa
Hola amigo Daniel:
muchas gracias por la aportación
Mustafa

Re: SpVoice Interface (SAPI 5.3)

Posted: Mon Feb 12, 2024 7:25 am
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 1068 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

Re: SpVoice Interface (SAPI 5.3)

Posted: Mon Feb 12, 2024 3:11 pm
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