SFSpeechRecognitionResult.final is always false

I have an app that is based off this sample: https://developer.apple.com/library/prerelease/content/samplecode/SpeakToMe/Listings/SpeakToMe_ViewController_swift.html#//apple_ref/doc/uid/TP40017110-SpeakToMe_ViewController_swift-DontLinkElementID_6


1) The sample needs to be updated and so does the API docs. SFSpeechRecognitionResult.isFinal doesn't exist. It seems that it was renamed to "final".


2) When running the code, I see the partial transcription as I'm speaking, but it will never stop. Final is never false.


Thanks for any help you can give. I haven't found a lot of example code in this area (they all use the sample I linked at the beginning and all have the same syntax errors).

Replies

> 2) When running the code, I see the partial transcription as I'm speaking, but it will never stop. Final is never false.

I meant to say "final is never true". Sorry.

In my tests I've found that after you append the AVAudioBuffer to the recognitionRequest it'll process it but you won't get final=1 until you tell the recognition request that there's no more audio coming with:


recognitionRequest?.endAudio()


Hope this helps.