Kodeco Forums

Speech Recognition Tutorial for iOS

Learn how to transcribe live or pre-recorded audio in your iOS app with the same engine used by Siri in this speech recognition tutorial for iOS.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/573-speech-recognition-tutorial-for-ios

Great Tutorial!, just one question, the files are made for the Xcode Beta?, its asking me for Swift 4

First off it’s configured to be Swift 4 (shouldn’t be necessary) but easy fix.
Never the less I opened it in Xcode Beta and continued Swift 4, when you add in the live transcript it hangs up, I tried both my version from the tutorial and the final project.

As soon as the camera start there is a crash, and I was not able to figure out what was wrong (It said something about wrong format/bitrate, but as the tutorial just says use the one that comes from the camera I have no idea why)

@axiom @dan1eln1el5en This was written under iOS 10 (for last year’s book). I wasn’t directly involved in the update, but as you mentioned I can see it was updated to target Swift 4 (every new tutorial we publish targets the beta). I’m guessing there was some change in the beta between now and the time this was published that is causing that crash. Let me first check with the folks involved in publishing it, and then I’ll take a closer look if not. Those issues of course weren’t happening in the iOS 10 version :wink:

@dan1eln1el5en did you happen to try changing the Swift language version, and running it in Xc8 on an iOS 10 device? That would help identify if the crash is related to the beta, or some change made in this port.

@jeffro ok ran it from Xcode beta to a non-beta phone and works fine. guess it’s an issue with iOS 11 beta (2). Thanks, I can continue :slight_smile:

Hi Jeff,

When I do the audio file recognition, the isFinal property is never true, except for the short Thai audio file.

When I print the results - result.bestTranscription.formattedString -, the strings are coming in, but the very last part is missing. It seems it is not returned by the closure.

Any idea?

ps:
I used the iOS 10 version (book) , on Xcode 8.3

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]