Source

JythonBook / src / chapter11 / LearningPyDev / src / hello / speech.py

Full commit
Josh Juneau d9b2bb8 







1
2
3
4
5
6
7
8
9
from com.sun.speech.freetts import VoiceManager, Voice
from hello import register_ui

@register_ui('speech')
def speech_message(msg): 
    voice = VoiceManager.getInstance().getVoice("kevin16")
    voice.allocate()
    voice.speak(msg)
    voice.deallocate()