Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
How to set speech recognition timeouts
Set how long a speech recognizer ignores silence or unrecognizable sounds (babble) and continues listening for speech input.
What you need to know
Technologies
Prerequisites
This topic builds on Quickstart: Speech recognition and How to manage issues with audio input.
To complete this tutorial, have a look through these topics to get familiar with the technologies discussed here:
- Install Microsoft Visual Studio.
- Get a developer license. For instructions, see Develop using Visual Studio 2013.
- Create your first Windows Store app using C# or Visual Basic.
- Roadmap for Windows Store apps using C# or Visual Basic
- Learn about events with Events and routed events overview
- See Speech design guidelines for helpful tips on designing a useful and engaging speech-enabled app.
Instructions
Set a timeout
Here, we specify various Timeouts values.
// Set timeout settings.
recognizer.Timeouts.InitialSilenceTimeout = TimeSpan.FromSeconds(6.0);
recognizer.Timeouts.BabbleTimeout = TimeSpan.FromSeconds(4.0);
recognizer.Timeouts.EndSilenceTimeout = TimeSpan.FromSeconds(1.2);
Remarks
Timeouts can be set on a per-recognizer basis.
Related topics
Responding to speech interactions
Designers