RecognizeCompletedEventArgs.InputStreamEnded Property
Gets whether an input stream has ended.
Namespace: Microsoft.Speech.Recognition
Assembly: Microsoft.Speech (in microsoft.speech.dll)
Syntax
'Declaration
Public ReadOnly Property InputStreamEnded As Boolean
public bool InputStreamEnded { get; }
public:
property bool InputStreamEnded {
bool get ();
}
/** @property */
public boolean get_InputStreamEnded ()
public function get InputStreamEnded () : boolean
Property Value
Returns a bool which is true if the recognition engine no longer has audio input, otherwise false.
Remarks
InputStreamEnded may be true even if the recognition operation is successful, if the audio output ended with the end of the recognized phrase.
Example
The example below show a simple anonymousmethod used as the handler for RecognizeCompleted. The handler stores the result of the recognition operation, if Result is not null and updates a state variable. If an error condition exists, a message is sent to the end user.
_recognizer.RecognizeCompleted += delegate(object sender, RecognizeCompletedEventArgs completedEventArgs) {
_recognitionDone = true;
if (completedEventArgs.Result != null) {
_completedEventArgs = completedEventArgs;
_recognitionSuccess = true;
} else {
_completedEventArgs = null;
_recognitionSuccess = false;
MessageBox.Show(String.Format("Recognition failed\n",
"InitialSilenceTimeout: {0}\n",
"BabbleTimeout: {0}\n",
"InputStreamEnded: {2}\n",
completedEventArgs.InitialSilenceTimeout,
completedEventArgs.BabbleTimeout,
completedEventArgs.InputStreamEnded));
}
};
Thread Safety
All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition
Target Platforms
See Also
Reference
RecognizeCompletedEventArgs Class
RecognizeCompletedEventArgs Members
Microsoft.Speech.Recognition Namespace