squarehippo10 squarehippo10 - 1 year ago 85
Swift Question

Swift - Speech Recognition - stop recording

Most speech recognition tutorials use a simple on/off button to switch between recording states. I would like to end recording as soon as the user has stopped speaking. I tried using isFinishing from SFSpeechRecognitionTask but that seems to have more to do with the state of the microphone itself and not the level of the signal being recorded.

Answer Source

A solution is to track the elpsed time since last result and after a certain amount of time stop recognition. result.isFinal seems not to work as it should. Check this answer for snippet code

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download