-
Notifications
You must be signed in to change notification settings - Fork 136
/
Copy pathLocalSpeech.py
25 lines (21 loc) · 935 Bytes
/
LocalSpeech.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
#########################################
# 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")