Interface TTSCache

@NonNullByDefault public interface TTSCache
Cache system to avoid requesting TTSService for the same utterances.
Gwendal Roulleau - Initial contribution
  • Method Summary

    Modifier and Type
    get(org.openhab.core.voice.internal.cache.CachedTTSService tts, String text, Voice voice, AudioFormat requestedFormat)
    Returns an AudioStream containing the TTS results.
  • Method Details

    • get

      AudioStream get(org.openhab.core.voice.internal.cache.CachedTTSService tts, String text, Voice voice, AudioFormat requestedFormat) throws TTSException
      Returns an AudioStream containing the TTS results. Note, one can only request a supported Voice and AudioStream or an exception is thrown. The AudioStream is requested from the cache, or, if not found, from the underlying TTS service
      tts - the TTS service
      text - The text to convert to speech
      voice - The voice to use for speech
      requestedFormat - The audio format to return the results in
      AudioStream containing the TTS results
      TTSException - If voice and/or requestedFormat are not supported or another error occurs while creating an AudioStream