SpeechProcessingManager.StartStreamingSpeechToText
StartStreamingSpeechToText
Syntax
StartStreamingSpeechToText(<Key>, <RecognitionHandler>, <ModelParameters>, <SpeechProcessingLocationUseVariant>, <StreamingSpeechToTextParameters>)
Parameters
<Key> (required)
Type: String. Stream recognition ID. If an active job with the specified ID already exists, an exception is thrown. Important. A key must be unique for a data area where recognition is performed.
<RecognitionHandler> (required)
Type: CallbackDescription. Procedure that is called as new recognition hypotheses appear with the following parameters:
- <RecognitionResult>. Type: SpeechToTextResult.
- <ContinueRecognition>. Type: Boolean. Indicates that speech recognition must be continued. Default value: True.
- <AdditionalParameters>. Value specified when creating the CallbackDescription object.
<ModelParameters> (optional)
Type: SpeechToTextModelParameters. Speech recognition model parameters with a specified language code. By default, the current session language is used. The other parameters are not defined.
<SpeechProcessingLocationUseVariant> (optional)
Type: SpeechProcessingLocationUseVariant. Option to use speech model location. Default value: Auto.
<StreamingSpeechToTextParameters> (optional)
Type: SpeechToTextStreamingParameters. Additional stream recognition parameters.
Description
Starts capturing the sound from the microphone and sending the stream for recognition.
We recommend that you start stream speech recognition using this method only interactively. In this case, the user will know that the audio will be captured to recognize the speech.
A speech recognition model is searched for as follows:
- Search for an appropriate connected model for local recognition. If it is found, a local model is used.
- If a local model is not found, a call is made to the cloud service.
- If a model is not found in the cloud service, an exception is thrown.
If you try to start more than one recognition stream using the same key, an exception is thrown.
When using external speech recognition, additional grammars set using the SetInfoBaseAdditionalGrammar method are unavailable. On MS Windows Server 2003/Windows XP the method throws an exception.
Availability
Thin client, web-client, mobile client, server, thick client, mobile application (client).
No comments to display
No comments to display