com.drismo.logic
Class QualityToSpeech

java.lang.Object
  extended by com.drismo.logic.QualityToSpeech
All Implemented Interfaces:
android.speech.tts.TextToSpeech.OnInitListener, QualityListener

public class QualityToSpeech
extends java.lang.Object
implements android.speech.tts.TextToSpeech.OnInitListener, QualityListener

TODO: Kommenter JAM


Field Summary
private  android.content.Context context
           
private  int frequency
           
private  long lastSpoken
           
private static java.lang.String[] MESSAGE
           
private  android.speech.tts.TextToSpeech mTts
           
private static java.util.Random RANDOM
           
private  int scoreCounter
           
private  long sumScore
           
private static java.lang.String TAG
           
 
Constructor Summary
QualityToSpeech(android.content.Context c)
           
 
Method Summary
 void onInit(int status)
          Implemented method to initiate text to speech.
 void onQualityUpdate(int newScore)
          Fired whenever the quality score is updated.
 void shutdown()
           
 void speak(java.lang.String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG

private static final java.lang.String TAG
See Also:
Constant Field Values

mTts

private android.speech.tts.TextToSpeech mTts

context

private android.content.Context context

frequency

private int frequency

lastSpoken

private long lastSpoken

sumScore

private long sumScore

scoreCounter

private int scoreCounter

RANDOM

private static final java.util.Random RANDOM

MESSAGE

private static final java.lang.String[] MESSAGE
Constructor Detail

QualityToSpeech

QualityToSpeech(android.content.Context c)
Method Detail

onInit

public void onInit(int status)
Implemented method to initiate text to speech.

Specified by:
onInit in interface android.speech.tts.TextToSpeech.OnInitListener
Parameters:
status - Given status.

shutdown

public void shutdown()

speak

public void speak(java.lang.String message)

onQualityUpdate

public void onQualityUpdate(int newScore)
Description copied from interface: QualityListener
Fired whenever the quality score is updated. Control the given input by using the Quality class.

Specified by:
onQualityUpdate in interface QualityListener
Parameters:
newScore - The new/updated quality score.
See Also:
Quality