Voice

Voice

Postby lailton.webmaster » Fri Oct 03, 2008 9:42 pm

Hey there

i wanna that voice out in portuguese

someone know hoW make it ?

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

function main()

   local oVoice := tOleAuto():New( "Sapi.SPVoice" )
   local SSFMCreateForWrite := 3
   oVoice:Speak( "Bem vindo ao mundo digital " )

return


only out english, is possible make it in portuguese ?

thanks so mmuch
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Postby Armando » Fri Oct 03, 2008 11:27 pm

laiton:

http://67.222.39.232/forums/viewtopic.php?t=12983

Pls, take a look to the above link in the spanish forum.

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3061
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Voice

Postby triumvirato » Sat Oct 04, 2008 10:06 am

lailton.webmaster wrote:Hey there

i wanna that voice out in portuguese

someone know hoW make it ?

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

function main()

   local oVoice := tOleAuto():New( "Sapi.SPVoice" )
   local SSFMCreateForWrite := 3
   oVoice:Speak( "Bem vindo ao mundo digital " )

return


only out english, is possible make it in portuguese ?

thanks so mmuch


Lailton,

As you can see in the link of Armando, there is the posibility of made your computer to speak in portuguesse. The only you have to made is install on your computer SAPI (Speech API) of Microsoft, versions 4.0 or 5.1, and also install one voice in portuguesse.
In SAPI 4.0, there are many free voices in portuguesse for, but i'm not sure in SAPI 5.1
In SAPI 5.1, the voices of Loquendo (with Rights, so they have a cost), run very good, and are voices of hight quality. This voices are which TomTom GPS Navigator use in his locutions to guide the users.
The voice of Loquendo in portuguesse - Brasilian is named "Gabriela".
Loquendo have voices in Italiano, Swedish, Germany, Portuguess, Brasilian, Russian, Mexican, French, etc.
Also for SAPI 5.1, there are lot of programs which install voices, and then you can use them, but i don't found one freeware that uses SAPI 5.1
Also, i think Microsoft Reader install three voices, but not portuguesse or spanish.

If you install SAPI 5.1 and a voice for it, you must select in "Control Panel/Voice" the voice installed. Then, your application will use the voice you have selected when you invoke "tOleAuto():New( "Sapi.SPVoice" )"

Wtih Speech SDK and through SAPI can also made speech recognition...
http://www.microsoft.com/downloads/details.aspx?FamilyId=5E86EC97-40A7-453F-B0EE-6583171B4530&displaylang=en


Sorry for my bad english...

Regards.
triumvirato
 
Posts: 199
Joined: Tue Apr 22, 2008 9:54 am
Location: Valladolid, Spain.

Postby triumvirato » Sat Oct 04, 2008 10:37 am

Para los que quieran experimentar con SAPI 5.3 (yo sólo he probado SAPI 5.1), aquí encontrarán bastante información :wink:

For whom want to experimentate with SAPI 5.3 (i only have used SAPI 5.1), here there is a lot of explanations and information :wink:


http://msdn.microsoft.com/en-us/library/ms723627(VS.85).aspx

Regards.
triumvirato
 
Posts: 199
Joined: Tue Apr 22, 2008 9:54 am
Location: Valladolid, Spain.

Postby triumvirato » Sun Oct 12, 2008 11:43 am

A little program to learn more:

PRG File:

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

static lIsPaused := .F.

function Main()

   local oDlg, oGetText, oBtnPlay, oBtnPause, oBtnStop, oBtnInterroga, oSbrVolume, oSbrTTSVelocity
   local oBtnVolumeUp, oBtnVolumeDown, oBtnVelocityUp, oBtnVelocityDown
   local oSayVolumeLevel, oSayVelocityLevel
   local nVolume := 50
   local nVelocity := 0
   local oVoice := tOleAuto():New( "Sapi.SPVoice" )
   local oVoiceInfo := tOleAuto():New( "Sapi.SPVoice" )

   // SpeechVoiceFlags
   local SVSFlagsAsync := 1
   local SVSFPurgeBeforeSpeak  := 2
   // SpeechVoiceEvents
   local SVEPhoneme := 64

   local cTextToRead := "La Guía de Programación de FiveWin, ofrece una introducción dirigida a técnicas " + ;
                        "de desarrollo de aplicaciones de Windows utilizando (x)Harbour y FiveWin. Esta guía " + ;
                        "explicará los conceptos básicos que usted debe tener para construir correctamente sus " + ;
                        "aplicaciones de Windows."

   oVoice:AlertBoundary := SVEPhoneme
   oVoice:Volume := nVolume
   oVoice:Rate := nVelocity
   
   
   
   DEFINE DIALOG oDlg RESOURCE "sound"

   REDEFINE GET oGetText VAR cTextToRead ID 10 OF oDlg MULTILINE UPDATE
     
   REDEFINE BUTTON oBtnPlay ID 2010 OF oDlg ACTION ( oVoice:Speak( cTextToRead, SVSFlagsAsync ) ) UPDATE
   
   REDEFINE BUTTON oBtnPause ID 2020 OF oDlg ACTION ( PauseResume( oVoice, oDlg, oBtnPause ), oDlg:Update() ) UPDATE
   
   REDEFINE BUTTON oBtnStop ID 2030 OF oDlg ACTION oVoice:Speak( " ",SVSFPurgeBeforeSpeak ) UPDATE
   
   REDEFINE BUTTON oBtnInterroga ID 2040 OF oDlg
   
   REDEFINE SAY oSayVolumeLevel ID 160 OF oDlg UPDATE
   
   oSayVolumeLevel:SetText( Str( nVolume ) )
   
   REDEFINE SAY oSayVelocityLevel ID 170 OF oDlg UPDATE
   
   oSayVelocityLevel:SetText( Str( nVelocity ) )
   
   REDEFINE BUTTON oBtnVolumeUp ID 120 OF oDlg;
            ACTION ( nVolume := nVolume + 10, iif( nVolume > 100, ( nVolume := 100 , MsgInfo( "Máximum Volume" ) ) ,;
            oVoice:Volume := nVolume ), oSayVolumeLevel:SetText( Str( nVolume ) ) ) UPDATE

   REDEFINE BUTTON oBtnVolumeDown ID 130 OF oDlg;
            ACTION ( nVolume := nVolume - 10, iif( nVolume < 0, ( nVolume := 0 , MsgInfo( "Mínimum Volume" ) ),;
            oVoice:Volume := nVolume ), oSayVolumeLevel:SetText( Str( nVolume ) ) ) UPDATE

   REDEFINE BUTTON oBtnVelocityUp ID 140 OF oDlg;
            ACTION ( nVelocity++, iif( nVelocity > 10, ( nVelocity := 10 , MsgInfo( "Máximum Velocity" ) ),;
            oVoice:Rate := nVelocity ), oSayVelocityLevel:SetText( Str( nVelocity ) ) ) UPDATE

   REDEFINE BUTTON oBtnVelocityDown ID 150 OF oDlg;
            ACTION ( nVelocity--, iif( nVelocity < -10, ( nVelocity := -10 , MsgInfo( "Mínimum Velocity" ) ),;
            oVoice:Rate := nVelocity ), oSayVelocityLevel:SetText( Str( nVelocity ) ) ) UPDATE

           
   ACTIVATE DIALOG oDlg CENTERED

return nil

function PauseResume( oVoice, oDlg, oBtnPause )
   
   iif( lIsPaused,;
      ( oVoice:Resume(), lIsPaused := .F., oBtnPause:SetText( "Pause" ) ),;
      ( oVoice:Pause(), lIsPaused := .T., oBtnPause:SetText( "Resume" ) ) )
   
return nil


.RC FILE:
Code: Select all  Expand view
#ifdef __FLAT__
  1 24 "WindowsXP.Manifest"
#endif

#define DIALOG_10   10
#define DIALOG_8   8
#define DIALOG_7   7
#define DIALOG_6   6
#define DIALOG_4   4
#define DIALOG_3   3
#define DIALOG_2   2
  #define DIALOG_1   1
#define DIALOG_5   5




sound DIALOG 69, 52, 446, 364
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Text To Speech (TTS)"
FONT 8, "MS Sans Serif"
{
PUSHBUTTON "Play", 2010, 75, 341, 63, 14
PUSHBUTTON "Pause", 2020, 139, 341, 55, 14
PUSHBUTTON "Stop", 2030, 195, 341, 63, 14
PUSHBUTTON "?", 2040, 259, 341, 55, 14
LTEXT "Texto a Leer:", -1, 5, 14, 48, 10
EDITTEXT 10, 52, 13, 278, 323, ES_MULTILINE | WS_BORDER | WS_TABSTOP
LTEXT "Volumen:", -1, 364, 72, 40, 10
LTEXT "Velocidad:", -1, 402, 72, 37, 10
PUSHBUTTON "+", 120, 371, 94, 17, 14
PUSHBUTTON "-", 130, 371, 114, 17, 14
PUSHBUTTON "+", 140, 409, 94, 17, 14
PUSHBUTTON "-", 150, 409, 114, 17, 14
LTEXT "Text", 160, 372, 135, 20, 8
LTEXT "Text", 170, 410, 135, 20, 8
LTEXT "Levels:", -1, 335, 135, 35, 10
}


Enjoy it...

Regards!
triumvirato
 
Posts: 199
Joined: Tue Apr 22, 2008 9:54 am
Location: Valladolid, Spain.

Its Cool

Postby lailton.webmaster » Sun Oct 12, 2008 7:12 pm

I try make here and have sucess

but yet no found how do say in portuguese language

thx v much
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Its Cool

Postby lailton.webmaster » Sun Oct 12, 2008 7:18 pm

I try make here and have sucess

but yet no found how do say in portuguese language

thx v much
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Postby Dorneles » Sun Oct 12, 2008 8:49 pm

Hello Lailton.

First you have to buy the license from the site.

http://www.nextup.com/purchase.html


After going into the control panel, the item Speech, and change.
Dorneles
 
Posts: 30
Joined: Mon Oct 30, 2006 2:39 pm
Location: Brasil

Legal

Postby lailton.webmaster » Mon Oct 13, 2008 3:51 am

Doneles

very cool SUCESS
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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