SpeechRecognitionServiceFactoryCreateDataClient Method (SpeechRecognitionMode, String, String) |
Create a DataRecognitionClient -- for speech recognition with data (for example from a file or audio source).
The data is broken up into buffers and each buffer is sent to the Speech Recognition Service.
No modification is done to the buffers, so the user can apply their own Silence Detection. Returns only text
recognition results. The audio must be PCM, mono, 16-bit sample, with sample rate of 8000 Hz or 16000 Hz.
Namespace: Microsoft.CognitiveServices.SpeechRecognitionAssembly: SpeechClient (in SpeechClient.dll) Version: 0.0.0.0
Syntax public static DataRecognitionClient CreateDataClient(
SpeechRecognitionMode speechRecognitionMode,
string language,
string primaryOrSecondaryKey
)
Public Shared Function CreateDataClient (
speechRecognitionMode As SpeechRecognitionMode,
language As String,
primaryOrSecondaryKey As String
) As DataRecognitionClient
public:
static DataRecognitionClient^ CreateDataClient(
SpeechRecognitionMode speechRecognitionMode,
String^ language,
String^ primaryOrSecondaryKey
)
static member CreateDataClient :
speechRecognitionMode : SpeechRecognitionMode *
language : string *
primaryOrSecondaryKey : string -> DataRecognitionClient
Parameters
- speechRecognitionMode
- Type: Microsoft.CognitiveServices.SpeechRecognitionSpeechRecognitionMode
In ShortPhrase mode the client gets one final multiple n-best choice result and
in LongDictation mode the client will receive multiple final results, based on
where the server thinks sentence pauses are.
- language
- Type: String
American English: "en-us"
British English: "en-gb"
German: "de-de"
Spanish: "es-es"
French: "fr-fr"
Italian: "it-it"
Mandarin: "zh-cn"
- primaryOrSecondaryKey
- Type: String
The primary or the secondary key. If you want to change the key(which is probably a good idea to
do every once in a while in case it gets leaked somehow), you would have some downtime if there
was only one key available. So you get two, the primary and the secondary.If you disable one
key the other key will still work giving you time to replace the disabled one.
Return Value
Type:
DataRecognitionClientThe created DataRecognitionClient.
See Also