Skip to content

Commit bf18a89

Browse files
Merge pull request #253727 from alexeyo26/alexeyo/custom-keyword-sample-length-warning
[Azure AI Svcs] Speech.. Custom Command. Warning on 1.5 of inital silence when using fromStreamInput()
2 parents 3bc284d + a04dcff commit bf18a89

File tree

1 file changed

+2
-0
lines changed
  • articles/ai-services/speech-service/includes/quickstarts/keyword-recognition

1 file changed

+2
-0
lines changed

articles/ai-services/speech-service/includes/quickstarts/keyword-recognition/csharp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ var keywordModel = KeywordRecognitionModel.FromFile("your/path/to/Activate_devic
3030
using var audioConfig = AudioConfig.FromDefaultMicrophoneInput();
3131
using var keywordRecognizer = new KeywordRecognizer(audioConfig);
3232
```
33+
> [!IMPORTANT]
34+
> If you prefer testing a keyword model directly with audio samples via the `AudioConfig.fromStreamInput()` method, make sure you use samples that have at least 1.5 seconds of silence before the first keyword. This is to provide an adequate time for the Keyword recognition engine to initialize and to get to the listening state prior to detecting the first keyword.
3335
3436
Next, running keyword recognition is done with one call to `RecognizeOnceAsync()` by passing your model object. This starts a keyword recognition session that lasts until the keyword is recognized. Thus, you generally use this design pattern in multi-threaded applications, or in use cases where you may be waiting for a wake-word indefinitely.
3537

0 commit comments

Comments
 (0)