You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> For instructions to download this sample and others, see [Samples for Speech SDK](samples.md).
20
20
21
21
> [!NOTE]
22
-
> For all samples below, we assume the following top-level declarations are in place:
23
-
>
24
-
> ```csharp
25
-
>usingSystem;
26
-
>usingSystem.Threading.Tasks;
27
-
>usingMicrosoft.CognitiveServices.Speech;
28
-
>usingMicrosoft.CognitiveServices.Speech.Intent;
29
-
> ```
30
-
>
31
-
> ```cpp
32
-
> #include<speechapi_cxx.h>
22
+
> Please obtain a subscription key first. In contrast to other services supported by the Cognitive Service Speech SDK, the Intent Recognition services requires a specific subscribtion key. [Here](https://www.luis.ai) you can find additional information about the intent recognition technology, as well as information on how to acquire a subscription key. Replace your own subscription key, the region of the service, as well as the AppId of your intent model in the appropriate place in the samples.
23
+
24
+
> [!NOTE]
25
+
> For all samples below the following top-level declarations should be in place:
wcout << L"There was an error, reason " << int(result->Reason) << L"-" << result->ErrorDetails << '\n';
129
-
}
130
-
```
31
+
## Intent Recognition Using Microphone
32
+
33
+
The code snippet below shows how to recognize intent from microphone input in the default language (`en-US`).
34
+
35
+
[!code-cpp[Intent Recognition Using Microphone](~/samples-cognitive-services-speech-sdk/Windows/cxx_samples/intent_recognition_samples.cpp#IntentRecognitionWithMicrophone)]
36
+
37
+
- - -
38
+
39
+
## Intent Recognition Using Microphone In a Specified Language
40
+
41
+
The code snippet below shows how to recognize intent from microphone input in a specified language, in this case in German (`de-de`).
42
+
43
+
[!code-cpp[Intent Recognition Using Microphone In A Specified Language](~/samples-cognitive-services-speech-sdk/Windows/cxx_samples/intent_recognition_samples.cpp#IntentRecognitionWithLanguage)]
131
44
132
45
- - -
46
+
47
+
## Intent Recognition From a File
48
+
49
+
The following code snippet recognizes intent from an audio file in the default language (`en-US`), the supported format is single-channel (mono) WAV / PCM with a sampling rate of 16 KHz.
[!code-cpp[Intent Recognition From a File](~/samples-cognitive-services-speech-sdk/Windows/cxx_samples/intent_recognition_samples.cpp?IntentRecognitionWithFile)]
54
+
55
+
- - -
56
+
57
+
## Intent Recognition Using Events
58
+
59
+
The code snippet shows how to recognize intent in a continuous way. This code allows access to additional information, like intermediate results.
60
+
61
+
[!code-cpp[Intent Recognition Using Events](~/samples-cognitive-services-speech-sdk/Windows/cxx_samples/intent_recognition_samples.cpp#IntentContinuousRecognitionUsingEvents)]
62
+
63
+
- - -
64
+
65
+
## Sample Source Code
66
+
67
+
The latest version of the samples and even more advanced samples are in a dedicated [GitHub repository](https://github.com/Azure-Samples/cognitive-services-speech-sdk).
@@ -41,9 +41,7 @@ The code snippet below shows how to recognize speech input from the microphone i
41
41
42
42
## Speech Recognition From a File
43
43
44
-
The code snippet below shows how to recognize speech input from a file in the default language (`en-US`),
45
-
using the factory's `CreateSpeechRecognizerWithFileInput` member function.
46
-
The audio format needs to be WAV / PCM with a single channel (mono) and 16 KHz sampling rate.
44
+
The following code snippet recognizes speech input from an audio file in the default language (`en-US`), the supported format is single-channel (mono) WAV / PCM with a sampling rate of 16 KHz.
@@ -55,9 +53,7 @@ The audio format needs to be WAV / PCM with a single channel (mono) and 16 KHz s
55
53
56
54
## Speech Recognition Using a Customized Model
57
55
58
-
The [Custom Speech Service (CRIS)](https://www.cris.ai/) allows to customize Microsoft's speech-to-text engine for your application.
59
-
The snippet below shows how to recognize speech from a microphone using your CRIS model;
60
-
fill in your CRIS subscription key and your own deployment ID before running it.
56
+
The [Custom Speech Service (CRIS)](https://www.cris.ai/) allows the customization of the Microsoft's speech-to-text engine for your application. The snippet below shows how to recognize speech from a microphone using your CRIS model; fill in your CRIS subscription key and your own deployment identification before running it.
61
57
62
58
[!code-csharp[Speech Recognition Using a Customized Model](~/samples-cognitive-services-speech-sdk/Windows/csharp_samples/speech_recognition_samples.cs#recognitionCustomized)]
63
59
@@ -73,9 +69,10 @@ fill in your CRIS subscription key and your own deployment ID before running it.
73
69
74
70
- - -
75
71
76
-
## Downloading the sample
72
+
## Sample Source Code
73
+
74
+
The latest version of the samples and even more advanced samples are in a dedicated [GitHub repository](https://github.com/Azure-Samples/cognitive-services-speech-sdk).
77
75
78
-
The samples in this article are contained in the sample package; please download from [here](https://aka.ms/csspeech/winsample).
[!code-csharp[Translation Using File Input](~/samples-cognitive-services-speech-sdk/Windows/csharp_samples/translation_samples.cs#TranslationWithFileAsync)]
44
44
45
45
- - -
46
+
47
+
## Sample Source Code
48
+
49
+
The latest version of the samples and even more advanced samples are in a dedicated [GitHub repository](https://github.com/Azure-Samples/cognitive-services-speech-sdk).
0 commit comments