Polly

javadoc

This is another Speech Synthesis Service !

This one use amazon cloud platform.

It is paid service, free to try 1 year (locally cached so it will cost some cents... )

https://aws.amazon.com/fr/polly/pricing/

Voices and informations :

https://aws.amazon.com/fr/polly/details/

Get the keys : ( security informations )

( create access key )

ONE IMPORTANT THING: Never share any API key with someone or publish it inside noworky blogs !
Amazon asked about 20.000$ from a friend when someone robbed the key to mine bitcoins. Hopefully this was resolved, thank them.

Example for develop:

#file : Polly.py edit raw

#########################################
# Polly.py
# categories: speech
# more info @: http://myrobotlab.org/service/Polly
#########################################

# start the service
mouth = Runtime.start('mouth','Polly')
voices = mouth.getVoices()

def sayHello():
  for voice in voices:
    print(str(voice))
    mouth.setVoice(voice.name)
    mouth.speakBlocking('Hello my name is ' + voice.name)

#possible voices ( selected voice is stored inside config until you change it )

print ("these are the voices I can have", str(voices))
print ("this is the voice I am using", mouth.getVoice())

# if you want them all to say hello
# sayHello()


# You sould't not expose keys here !! inside gui is a good place
# But you can do it here ( only once is enough )
# An AES safe is used to store keys
# polly.setKeys("YOUR_KEY_ID","YOUR_KEY_SECRET")
mouth.setLanguage("en")
mouth.setVoice(u"Brian")
mouth.speakBlocking(u"Hello this is Brian speakin !")
mouth.speakBlocking(u"The polly service has " + str(voices.size()) + " voices to choose from")
mouth.speakBlocking(u"if you want to hear a sample of them all, uncomment the say hello method in this script")
mouth.setLanguage("fr")
mouth.setVoice(u"Chantal")
mouth.speakBlocking(u"Ceci est une voix fran├žaise")
mouth.setVolume(0.7)
mouth.speakBlocking("Silent please")