1 //Create a class for speech synthesis
2 package SpeechSynthesis
3 import Timer.SimulatedTimer
5 public class SpeechSynthesis {
8 private String displayName
12 SpeechSynthesis(String id, String label, String displayName, int level) {
15 this.displayName = displayName
19 def setLevel(int level) {
20 if (level != this.level) {
21 println("The level of speech synthesis with id:$id is changed to $level")
26 def speak(String message) {
27 println("Speech synthesis with id:$id, SPEAKING:\"$message\"!")