Hello,

 

I'm trying to use the windows TTS in MRL but I don't know if it is possible to add the win32com library.

I've downloaded this file : http://www.java2s.com/Code/Jar/c/Downloadcommwin32all201jar.htm and put in libraries\jar folder but it didn't work.

under python 2.7 with pywin32, it's quite easy to use windows TTS :

 

import win32com.client

speaker = win32com.client.Dispatch("SAPI.SpVoice")

speaker.Speak("Hello, it works!")

 

Thanks !

kwatters

7 years 9 months ago

Hi Bretzel_59,

  So, in MRL we use "jython" as our python interpreter.  This is a java version of python that powers all of the scripting.  There are some subtle differences between python and jython.  One of which is that native library integration isn't supported in jython, so the win32com api doesn't work with jython. 

  Ok, so that being said, it sounds like what you want is to use the native TTS API in MS Windows.  I think perhaps the best way to do this is to see if you can have a command line utility that you could run to generate the speech and use jython to invoke that command line utility as it's probably going to be an up hill battle to fully support the win32com api in jython.

  Hope this helps,

    -Kevin

Bretzel_59

7 years 9 months ago

In reply to by dom14

Thanks Kevin.

 

Dom has found Jampal, a TTS program accessible with command line.

 

Really easy to use it in MRL :

Thanks Dom !!!

 

Edit : (works under Linux) : For Linux or CYGWIN installations, there is a script file (ptts.sh) which provides everything here but supports many speech engines and languages. Run ptts.sh --help to get information on it. Note that under Linux the Microsoft speech engine will not work, another speech engine must be installed.