• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SFSpeechRecognizer - recognitionTaskWithRequest - result not found
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SFSpeechRecognizer - recognitionTaskWithRequest - result not found


  • Subject: SFSpeechRecognizer - recognitionTaskWithRequest - result not found
  • From: Devarshi Kulshreshtha <email@hidden>
  • Date: Fri, 11 May 2018 16:39:58 +0530

I am executing SpeakToMe code (
https://developer.apple.com/library/content/samplecode/SpeakToMe/Introduction/Intro.html
)
provided by apple on an iPad.

Most of the time it works fine, however sometimes it does not recognize
speech by user, below is the part of code which does not work as expected
in such scenarios:

recognitionTask = speechRecognizer.recognitionTask(with:
recognitionRequest) { result, error in
            var isFinal = false

            if let result = result {
                self.textView.text =
result.bestTranscription.formattedString
                isFinal = result.isFinal
            }

            if error != nil || isFinal {
                self.audioEngine.stop()
                inputNode.removeTap(onBus: 0)

                self.recognitionRequest = nil
                self.recognitionTask = nil

                self.recordButton.isEnabled = true
                self.recordButton.setTitle("Start Recording", for: [])
            }
        }

In above code following error is obtained:

SiriCoreSiriConnectionErrorDomain - code 4

Also I noticed that Siri stops recognising speech by user, when the same
behavior fails in the app. In order to make it work I have to restart the
device.

Any ideas on what could be wrong and how to resolve it?

--
Thanks,

Devarshi
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Next by Date: AirPrint in iOS 11?
  • Next by thread: AirPrint in iOS 11?
  • Index(es):
    • Date
    • Thread