public class SpeedTracker extends ConfigurableAdapter implements ResultListener, Resetable, StateListener, SignalListener, Monitor
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_FRONTEND
The property that defines which frontend to monitor
|
static java.lang.String |
PROP_RECOGNIZER
The property that defines which recognizer to monitor
|
static java.lang.String |
PROP_SHOW_DETAILS
The property that defines whether detailed accuracy information is displayed
|
static java.lang.String |
PROP_SHOW_RESPONSE_TIME
The property that defines whether detailed response information is displayed
|
static java.lang.String |
PROP_SHOW_SUMMARY
The property that defines whether summary accuracy information is displayed
|
static java.lang.String |
PROP_SHOW_TIMERS
The property that defines whether detailed timer information is displayed
|
logger| Constructor and Description |
|---|
SpeedTracker() |
SpeedTracker(Recognizer recognizer,
FrontEnd frontEnd,
boolean showSummary,
boolean showDetails,
boolean showResponseTime,
boolean showTimers) |
| Modifier and Type | Method and Description |
|---|---|
float |
getCumulativeSpeed()
Returns the cumulative speed of this decoder as a fraction of real time.
|
java.lang.String |
getName() |
float |
getSpeed()
Returns the speed of the last decoding as a fraction of real time.
|
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured.
|
void |
newResult(Result result)
Method called when a new result is generated
|
void |
reset()
Resets the speed statistics
|
protected void |
showAudioSummary()
Shows the audio summary data
|
protected void |
showAudioUsage()
Shows the audio usage data
|
void |
signalOccurred(Signal signal)
Method called when a signal is detected
|
void |
statusChanged(Recognizer.State status)
Called when the status has changed.
|
initLogger, toString@S4Component(type=Recognizer.class) public static final java.lang.String PROP_RECOGNIZER
@S4Component(type=FrontEnd.class) public static final java.lang.String PROP_FRONTEND
@S4Boolean(defaultValue=true) public static final java.lang.String PROP_SHOW_SUMMARY
@S4Boolean(defaultValue=true) public static final java.lang.String PROP_SHOW_DETAILS
@S4Boolean(defaultValue=false) public static final java.lang.String PROP_SHOW_RESPONSE_TIME
@S4Boolean(defaultValue=false) public static final java.lang.String PROP_SHOW_TIMERS
public SpeedTracker(Recognizer recognizer, FrontEnd frontEnd, boolean showSummary, boolean showDetails, boolean showResponseTime, boolean showTimers)
public SpeedTracker()
public void newProperties(PropertySheet ps) throws PropertyException
ConfigurablenewProperties in interface ConfigurablenewProperties in class ConfigurableAdapterps - a property sheet holding the new dataPropertyException - if there is a problem with the properties.public java.lang.String getName()
getName in class ConfigurableAdapterConfigurable.public void newResult(Result result)
ResultListenernewResult in interface ResultListenerresult - the new resultprotected void showAudioUsage()
protected void showAudioSummary()
public float getSpeed()
public float getCumulativeSpeed()
public void signalOccurred(Signal signal)
SignalListenersignalOccurred in interface SignalListenersignal - the signalpublic void statusChanged(Recognizer.State status)
StateListenerstatusChanged in interface StateListenerstatus - the new status