Building a new app using the model

Now perform the following steps to create a new iOS app to use the speech commands recognition model:

  1. Create a new Objective-C app named AudioRecognition in Xcode, and set the project to use TensorFlow manually-built libraries as summarized in step 1 of the Using fast neural style transfer models in iOS section of Chapter 4, Transforming Pictures with Amazing Art Styles. Also add AudioToolbox.framework, AVFoundation.framework, and Accelerate.framework to the Target's Link Binary With Libraries.
  1. Drag and drop the speech_commands_graph.pb model file to the project.
  2. Change the extension of ViewController.m to mm, then add the following headers used by audio recording and processing:
#import <AVFoundation/AVAudioRecorder.h> ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.