-
Notifications
You must be signed in to change notification settings - Fork 136
/
Copy pathMarySpeech.py
38 lines (30 loc) · 1.2 KB
/
MarySpeech.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#start Service
mouth = Runtime.start("MarySpeech", "MarySpeech")
#possible voices
print ("these are the voices I can have", mouth.getVoices())
print ("this is the voice I am using", mouth.getVoice())
#install a voice:
#an overview over all official voices is available @ http://myrobotlab.org/service/MarySpeech
#mouth.installComponentsAcceptLicense(voicename)
#e.g.
#mouth.installComponentsAcceptLicense("bits1")
#switch voice:
#mouth.setVoice("bits1")
#mouth.setVoice("cmu-slt-hsmm")
#etc...
# ru voice : download & extract at mrl root : http://www.myai.cloud/mrl/mary-mrl-ru.zip
#mouth.setVoice("ac-nsh")
#mouth.speakBlocking(u"привет")
#speakBlocking!
# this blocks until speaking is done
mouth.speakBlocking(u"Hello world")
mouth.speakBlocking(u"I speak English. More voices are available, but they need to be installed")
mouth.speakBlocking(u"Echo echo echo")
mouth.speakBlocking(u"What should I use")
#add voice effects:
#more effects and information @ http://myrobotlab.org/service/MarySpeech
mouth.setAudioEffects("FIRFilter+Robot(amount=50)")
mouth.speakBlocking(u"this is after a sound effect ")
#speak!
# this not blocks speaking and next line is executed immediatly
mouth.speak(u"Happy birthday Kyle")