LocalSpeech

javadoc

This text to speech synthesis service use local operating system text to speech engine.

MacOs :

Just set your voice, inside control panel
You can test it using say "something" inside terminal

http://cdn.osxdaily.com/wp-content/uploads/2011/07/add-new-voices-to-os-x-lion.jpg

 

Windows :

For information there is a little tool that do the magic in background ( tts\tts.exe ). This is transparent for you.

By default there is not a lot of voices, but you can add what you want inside your local system. Free or Paid SAPI voices ( mbrola / best-of-vox.com etc ... )

How to Unlock Mobile Text-To-Speech Voice in Windows 10 ( creator update , if you have corresponding language pack )

Download reg files : www.myai.cloud/mrl/mobile.windows10.zip

By default, the Microsoft mobile voice is locked for using in text-to-speech software via SAPI 5. You can unlock it with a simple registry tweak. Download the archive, extract the file for your language and for your version of the operating system ("mobile_x86.reg" for 32bit and "mobile_x64.reg" for 64bit), click the right mouse button on the file's name and choose the context menu item "Merge". The Microsoft mobile voice will appear in the list of the available voices

You can check voice list using

python command : print microsoftlocaltts.getVoices();
dos command : tts\tts -V

Linux : TODO

Examples:


#file : service/LocalSpeech.py edit raw
#########################################
# LocalSpeech.py
# description: used as a general template
# categories: speech
# more info @: http://myrobotlab.org/service/LocalSpeech
#########################################

# start the service
localSpeech = Runtime.start('localSpeech','LocalSpeech')

# ( windows )
# get available system voices for information ( check id )
# exemple : print localSpeech.getVoices();
# 0 Microsoft Zira Desktop - English (United States)
# 1 Microsoft Hortense Desktop - French
# override tts.exe temp output path : microsoftlocaltts.ttsExeOutputFilePath="c:\\tmp\\"

# ( macOs )
# set your voice from macos control panel
# you can test it using say command from terminal

localSpeech.setVoice("0")
localSpeech.speakBlocking(u"Hello this is an english voice")
localSpeech.setVoice("1")
localSpeech.speakBlocking(u"Bonjour ceci est une voix française, je teste les accents aussi avec le mot éléphant")

GroG's picture

Thanks Moz4r, It worky for me

Thanks Moz4r,

It worky for me !

Ash's picture

Hi moz4r, worky on Ash with

Hi moz4r,

worky on Ash with OsX (10.12.6) on the mac mini.

It's great, thanks a lot for your work ;-)