SAPI.SpVoice to Greek

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
conjure
Pro Scripter
Posts: 63
Joined: Thu Jan 12, 2012 3:05 pm

SAPI.SpVoice to Greek

Post by conjure » Sun Feb 28, 2016 4:17 pm

Hi i found this code to make my pc speak,so i searched a way to make it speak greek,and i found a vb code that works, but i dont know how to make it work for MS.Can someone help me please?

Code: Select all

VBSTART

   Sub Speak(text)
   Dim Talk
   Set Talk = CreateObject("SAPI.SpVoice")
   Talk.Speak text
   End Sub

VBEND
SpVoice voice = new SpVoice();
voice.Speak(
"<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='el-GR'>"
+ "Να ενα κειμενο"
+ "</speak>",
SpeechVoiceSpeakFlags.SVSFlagsAsync|SpeechVoiceSpeakFlags.SVSFIsXML);
voice.WaitUntilDone(30000);

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: SAPI.SpVoice to Greek

Post by Marcus Tettmar » Mon Feb 29, 2016 3:22 pm

Try:

Code: Select all

VBSTART

   Sub Speak(text)
   Dim Talk
   Set Talk = CreateObject("SAPI.SpVoice")
   Talk.Speak text
   End Sub

VBEND

VBRun>Speak,Hello World
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

conjure
Pro Scripter
Posts: 63
Joined: Thu Jan 12, 2012 3:05 pm

Re: SAPI.SpVoice to Greek

Post by conjure » Mon Feb 29, 2016 4:58 pm

Marcus do you know if its possible to add the Greek language?
like the
xml:lang='el-GRon
in the sample i posted above?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: SAPI.SpVoice to Greek

Post by Marcus Tettmar » Thu Mar 03, 2016 9:08 am

Like this I think:

Code: Select all

VBSTART

   Sub Speak(text)
     Dim Talk
     Set Talk = CreateObject("SAPI.SpVoice")
     Talk.Voice = Talk.GetVoices("Name=Microsoft Mike", "Language=408").Item(0)
     Talk.Speak text
   End Sub

VBEND
See:

https://msdn.microsoft.com/en-us/librar ... s.85).aspx
https://msdn.microsoft.com/en-us/librar ... e.14).aspx
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: SAPI.SpVoice to Greek

Post by CyberCitizen » Wed Jun 08, 2016 4:23 am

Anyway To Adjust The Speed?
FIREFIGHTER

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: SAPI.SpVoice to Greek

Post by Marcus Tettmar » Wed Jun 08, 2016 9:20 am

Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: SAPI.SpVoice to Greek

Post by Marcus Tettmar » Wed Jun 08, 2016 9:20 am

Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: SAPI.SpVoice to Greek

Post by CyberCitizen » Wed Jun 08, 2016 9:35 am

Code: Select all

https://msdn.microsoft.com/en-us/library/ms723606%28v=vs.85%29.aspx
URL Broken, updated.

Grr URL won't post with brackets.
FIREFIGHTER

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: SAPI.SpVoice to Greek

Post by CyberCitizen » Fri Jun 10, 2016 4:12 am

I don't know VB, are you able to put it into the MS command for me?

Code: Select all

VBSTART
Sub Speak(text)
 Dim Talk
 Set Talk = CreateObject("SAPI.SpVoice")
 Talk.Speak text
End Sub
VBEND

VBRun>Speak,Hello Keith

FIREFIGHTER

hagchr
Automation Wizard
Posts: 327
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: SAPI.SpVoice to Greek

Post by hagchr » Fri Jun 10, 2016 9:15 am

Code: Select all

VBSTART
Sub Speak(text,speed)
 Dim Talk
 Set Talk = CreateObject("SAPI.SpVoice")
 Talk.Rate=speed
 Talk.Speak text
End Sub
VBEND

Let>VBS_TIMEOUT=60000
//Rate between -10 and 10
VBRun>Speak,Hello Keith,5

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts