ios - How to stop Speech Recognition (Dictation) in Apple Watch when the user stops speaking? -


i have succesfully implemented native speech recognition (dictation) in apple watch (watchos 2.1, ios 9.2.1) used code, empty "menu options array":

func launchdictation(){         self.presenttextinputcontrollerwithsuggestions([], allowedinputmode: wktextinputmode.plain, completion:{             (results) -> void in                 let aresult = results?[0] as? string                 if(!(aresult == nil)){                     print(aresult)                     print("short asr completed")                     dispatch_async(dispatch_get_main_queue()) {                         // update ui                     }                 }//end if             })//end show voice menu     } 

as is... user taps "speak button", view pops (showing detected words user speaks , nice small volume graph). right now, user has speak, , tap "done" complete speech recognition. if phrase detected "done" not tapped "dictation failed" appear onscreen. know how implement listener or delegate detects when end of dictation process few seconds after user has stopped speaking?


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -