How to speak your PC./ como hacer hablar tu pc.

Source code related resources

Moderator: Rathinagiri

User avatar
luisvasquezcl
Posts: 1046
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 12 times
Been thanked: 14 times
Contact:

How to speak your PC./ como hacer hablar tu pc.

Post by luisvasquezcl » Tue Jan 19, 2010 6:22 pm

Hi, this is the code:

#include <minigui.ch>
Function Main
oVoz = CreateObject("SAPI.SpVoice")
oVoz:Speak("Harbour Minigui")
oVoz:Speak("La mejor libreria GUI")
oVoz:= NIL
Return nil

works with Windows XP SP2 that is my setup, I do not know if it works with
other versions.
Tested and works well .... Enjoy
Best regards,
Luis Vasquez

User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Post by Vanguarda » Tue Jan 19, 2010 8:26 pm

Hi friend,

WOW.... very very nice, thank for share this nice function.

It´s work on WIN7 Ultimate

My best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/

User avatar
Roberto Lopez
HMG Founder
Posts: 3904
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 137 times

Post by Roberto Lopez » Tue Jan 19, 2010 9:47 pm

luisvasquezcl wrote:Hi, this is the code:

#include <minigui.ch>
Function Main
oVoz = CreateObject("SAPI.SpVoice")
oVoz:Speak("Harbour Minigui")
oVoz:Speak("La mejor libreria GUI")
oVoz:= NIL
Return nil

works with Windows XP SP2 that is my setup, I do not know if it works with
other versions.
Tested and works well .... Enjoy
Best regards,
Luis Vasquez
Very nice :)

It works in XP-SP3 too.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
sudip
Posts: 1444
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 4 times

Post by sudip » Wed Jan 20, 2010 9:37 am

Hello Luis Vasquez,

Thanks a lot :D
It works for me also. It can be used as error message !!!! :idea:

I just created a small funny sample with your code. Have fun :lol:

Code: Select all

#include "minigui.ch"

Function main()
   
   define window winMain at 0, 0 width 400 height 300 title "Voice Testing" main
   
      @ 10, 10 label label_1 value "Enter Test:"
      @ 50, 10 editbox edit_1 width 380 height 180
      @ 240, 150 button button_1 caption "Speak Now" action SpeakIt(winMain.edit_1.value)  
   
   end window
   
   winMain.center
   winMain.activate
   
   return  nil
   

Function SpeakIt(cString)
   oVoz = CreateObject("SAPI.SpVoice")              
   oVoz:Speak(cString)
   oVoz:= NIL
   return nil
With best regards.

Sudip
Last edited by sudip on Sun Jan 24, 2010 4:24 am, edited 1 time in total.
With best regards,
Sudip

User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Post by Vanguarda » Wed Jan 20, 2010 11:58 am

Hi friends,

SUDIP, nice code, Very fun . Thanks for sharing.

My best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/

User avatar
Rathinagiri
Posts: 5187
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 143 times
Been thanked: 131 times
Contact:

Post by Rathinagiri » Wed Jan 20, 2010 3:14 pm

Ha Ha!

Super! It is just that easy!? Great.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
mustafa
Posts: 608
Joined: Fri Mar 20, 2009 11:38 am
Location: Alicante - Spain
Been thanked: 47 times

Post by mustafa » Wed Jan 20, 2010 4:01 pm

Hello here I leave a hos old Clipper program to play melodies
is the version compiled with xHarbour console mode.
HMG and converted into work, so never dies Clipper
A Greeting

Hola aquí hos dejo un viejo programa de Clipper para tocar melodias
está la versión compilada con xHarbour modo consola.
Reconvertido en HMG y funciona , por lo tanto Clipper nunca Muere
Un Saludo

Mustafa :mrgreen:
Attachments
Music_Tone.zip
(1.13 MiB) Downloaded 508 times

User avatar
mustafa
Posts: 608
Joined: Fri Mar 20, 2009 11:38 am
Location: Alicante - Spain
Been thanked: 47 times

Post by mustafa » Wed Jan 20, 2010 4:03 pm

Here I leave a screenshot of Clipper :mrgreen:
Attachments
Clipper.jpg
Clipper.jpg (51.75 KiB) Viewed 2050 times

jucar_es
Posts: 75
Joined: Thu Nov 13, 2008 11:12 pm

Post by jucar_es » Wed Jan 20, 2010 4:26 pm

al compilarlo me genera el error

funcion indefinida speak

GRACIAS

User avatar
mol
Posts: 2903
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 145 times
Been thanked: 81 times
Contact:

Post by mol » Wed Jan 20, 2010 5:23 pm

Fine works!
Thanks Luis and Sudip.

But Polish language sounds very poor :-(

Post Reply