MicrosoftLocalTTS

javadoc

 

This text to speech synthesis use local Microsoft SAPI engine.
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 voices

https://superuser.com/questions/590779/how-to-install-more-voices-to-win...

https://best-of-vox.com/windows

Oh it's funny, result is like VoiceRss online voices, ...

You can find another similar service: MicrosoftSpeech ( jampal.exe needed , and no audiofile use )

Examples:


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

# start the service
microsoftlocaltts = Runtime.start('microsoftlocaltts','MicrosoftLocalTTS')

print microsoftlocaltts.getVoices();
# get available system voices for information ( check id )
# exemple :
# 0 Microsoft Zira Desktop - English (United States)
# 1 Microsoft Hortense Desktop - French
# override tts.exe temp output path : microsoftlocaltts.ttsExeOutputFilePath="c:\\tmp\\"
microsoftlocaltts.setVoice("0")
microsoftlocaltts.speakBlocking(u"Hello this is an english voice")
microsoftlocaltts.setVoice("1")
microsoftlocaltts.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 !