Class Speech

All Implemented Interfaces:
ContextProvider, PropertyChangeSource, Rebindable

public class Speech extends AnahataToolkit
A toolkit for speech synthesis (TTS) and audio alerts. Part of the 'Yam' module for creative and experimental tools. Uses FreeTTS for a pure-Java, OS-independent voice.
Author:
anahata
  • Field Details

  • Constructor Details

    • Speech

      public Speech()
  • Method Details

    • speak

      public String speak(String text) throws Exception
      Dynamically configures the freetts.voices system property to locate the Kevin voice directory. Uses JavaStreamingAudioPlayer for OS-independent playback.
      Parameters:
      text - The text to speak.
      Returns:
      A status message confirming the speech execution.
      Throws:
      Exception - If the voice cannot be allocated or the engine fails.
    • beep

      public String beep()
      Plays a simple system beep as a low-cost alert.
      Returns:
      A status message.