X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosVoice.java;h=ebe9d5a81c0d5c8b1cab4084db70925dc59049b8;hp=e4ea99a2220d80a8abbe3a83a602486a7a45f236;hb=9c9b35254c693b3ade42b24d1e29eaf31e6ba2aa;hpb=563a9dcdfef42718370c49f16cc2271642b3e055 diff --git a/ao-tools/altosui/AltosVoice.java b/ao-tools/altosui/AltosVoice.java index e4ea99a2..ebe9d5a8 100644 --- a/ao-tools/altosui/AltosVoice.java +++ b/ao-tools/altosui/AltosVoice.java @@ -39,7 +39,8 @@ public class AltosVoice implements Runnable { } catch (InterruptedException e) { } } - public void speak(String s) { + + public void speak_always(String s) { try { if (voice != null) phrases.put(s); @@ -47,6 +48,15 @@ public class AltosVoice implements Runnable { } } + public void speak(String s) { + if (AltosPreferences.voice()) + speak_always(s); + } + + public void speak(String format, Object... parameters) { + speak(String.format(format, parameters)); + } + public AltosVoice () { voice_manager = VoiceManager.getInstance(); voice = voice_manager.getVoice(voice_name); @@ -55,7 +65,6 @@ public class AltosVoice implements Runnable { phrases = new LinkedBlockingQueue (); thread = new Thread(this); thread.start(); - speak("Rocket Flight Monitor Ready"); } else { System.out.printf("Voice manager failed to open %s\n", voice_name); Voice[] voices = voice_manager.getVoices();