Package lukas.wais.smart.mirror.model
Class Polly
java.lang.Object
lukas.wais.smart.mirror.model.Polly
public class Polly
extends java.lang.Object
This class represents the AI Polly from AWS.
- Author:
- Lukas Wais
-
Constructor Summary
Constructors Constructor Description Polly(com.amazonaws.regions.Region region) -
Method Summary
Modifier and Type Method Description static PollygetInstance()Singleton instance of Polly.voidplay(java.lang.String text)This method plays an arbitrary String.static voidspeak(java.lang.String text)Speak method of Polly.
-
Constructor Details
-
Polly
public Polly(com.amazonaws.regions.Region region)
-
-
Method Details
-
play
public void play(java.lang.String text)This method plays an arbitrary String. It is the heart of Polly. Moreover some output is printed to console for testing. It is synchronized for the thread executor.- Parameters:
text- you want to have spoken by Polly.
-
getInstance
Singleton instance of Polly.- Returns:
- the Polly instance.
-
speak
public static void speak(java.lang.String text)Speak method of Polly. It executes the generated MP3, so you can hear Polly.- Parameters:
text- you want to speak.
-