Swift Speech Recognition - Pause so response can be read back to user

74 Views Asked by At

I am using speech recognition for input from the user and I want to read the result back to the user using AVSpeechSynthesizer as a verification. The problem is that when the speech is read back the Speech Recognition reads it again. I'm trying to find a way to pause speech recognition after it reads a specific phrase so the synthesizer can read it back.

1

There are 1 best solutions below

2
Shalini Krishna On

one way of doing it is to use voice activity detector. Basically, this library, stops recording once silence is detected. Make this as a conditional statement, if satisfied continue executing subset tasks. If you could share more details, it'll help.