Package org.openhab.core.voice.tts
Interface TTSCache
@NonNullByDefault
public interface TTSCache
Cache system to avoid requesting
TTSService for the same utterances.- Author:
- Gwendal Roulleau - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionget(CachedTTSService tts, String text, Voice voice, AudioFormat requestedFormat) Returns anAudioStreamcontaining the TTS results.
-
Method Details
-
get
AudioStream get(CachedTTSService tts, String text, Voice voice, AudioFormat requestedFormat) throws TTSException Returns anAudioStreamcontaining the TTS results.Upon requesting an unsupported
VoiceorAudioFormat, aTTSExceptionis thrown.The AudioStream is requested from the cache, or, if not found, from the underlying TTS service.
- Parameters:
tts- the TTS servicetext- The text to convert to speechvoice- The voice to use for speechrequestedFormat- The audio format to return the results in- Returns:
- AudioStream containing the TTS results
- Throws:
TTSException- Ifvoiceand/orrequestedFormatare not supported or another error occurs while creating anAudioStream.
-