1 //Create a class for speech synthesis
2 package SpeechSynthesis
3 import Timer.SimulatedTimer
5 public class SpeechSynthesis {
8 private String displayName
10 private boolean oneUser
13 SpeechSynthesis(String id, String label, String displayName, int level, boolean oneUser) {
16 this.displayName = displayName
18 this.oneUser = oneUser
21 def setLevel(int level) {
22 if (level != this.level) {
23 println("The level of speech synthesis with id:$id is changed to $level")
28 def speak(String message) {
29 println("Speech synthesis with id:$id, SPEAKING:\"$message\"!")
30 // As a conflict variable