SFSpeechRecognizer (Siri Transcription) Timeout Error on iOS App

In my iOS app, I am trying to transcribe prerecorded audio using iOS 10's latest feature, the Speech API.


Multiple sources including the documentation have stated that the audio duration limit for the Speech API (more specifically SFSpeechRecognizer) is 1 minute.


In my code, I have found that any audio files with a length of about 15 seconds or more, will get the following error:


Error Domain=kAFAssistantErrorDomain Code=203 "SessionId=com.siri.cortex.ace.speech.session.event.SpeechSessionId@50a8e246, Message=Timeout waiting for command after 30000 ms" UserInfo={NSLocalizedDescription=SessionId=com.siri.cortex.ace.speech.session.event.SpeechSessionId@50a8e246, Message=Timeout waiting for command after 30000 ms, NSUnderlyingError=0x170248c40 {Error Domain=SiriSpeechErrorDomain Code=100 "(null)"}}



I have searched all over the internet and have set to find a solution to this. There also have been people with the same problem. Some people suspect that it's a problem with Nuance.


It is also worth noting that I do get partial results from the transcription process.


Here's the code from my iOS app.

` // Create a speech recognizer request object.

let srRequest = SFSpeechURLRecognitionRequest(url: location)

srRequest.shouldReportPartialResults = false

sr?.recognitionTask(with: srRequest) { (result, error) in

if let error = error {

// Something wrong happened

print(error.localizedDescription)

} else {

if let result = result {

print(4)

print(result.bestTranscription.formattedString)

if result.isFinal {

print(5)

transcript = result.bestTranscription.formattedString

print(result.bestTranscription.formattedString)

// Store the transcript into the database.

print("\nSiri-Transcript: " + transcript!)

// Store the audio transcript into Firebase Realtime Database

self.firebaseRef = FIRDatabase.database().reference()

let ud = UserDefaults.standard

if let uid = ud.string(forKey: "uid") {

print("Storing the transcript into the database.")

let path = "users" + "/" + uid + "/" + "siri_transcripts" + "/" + date_recorded + "/" + filename.components(separatedBy: ".")[0]

print("transcript database path: \(path)")

self.firebaseRef.child(path).setValue(transcript)

}

}

}

}

}`



Thank you for your help.

Hello,


I am also facing the same issue. If you find any solution please let me know.
Thanks in advance.


Regards,
Veeral

I also encountered the same problem, but I happened to use the video extraction audio for recognition, normal recording recognition and real-time recognition, no problem, I suspect this may be related to file size, etc. I will further study

i have the same problem with real-time recognition , have you found a solution?
I recommend that you start a new thread for this and tag it with Speech, because that’s more likely to attract the attention of folks who know about this stuff. This thread was migrated from the previous DevForums platform and is tagged in a way that very few folks are going to look at it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
same problem please help
when i'm silent
when the nothing to result.bestTranscription

[Utility] +[AFAggregator logDictationFailedWithError:] Error Domain=kAFAssistantErrorDomain Code=203 "Error" UserInfo={NSLocalizedDescription=Error, NSUnderlyingError=0x6000021b2100 {Error Domain=SiriSpeechErrorDomain Code=201 "(null)"}}


how did you fix this issue? I'm, having the same issue in ONE DEVICE, ALL THE OTHERS WORK FINE!! and only fails in ENGLISH, WTH!

SFSpeechRecognizer (Siri Transcription) Timeout Error on iOS App
 
 
Q