Partager via


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:

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.

Responding to speech interactions

Designers

Speech design guidelines