About the Download

Ti.Speech

Ti.Speech is an iOS Hyperloop module that exposes one of the coolest iOS 10 API’s unveiled by Apple in the latest WWDC.

As Apple describes its own API:

 With the user’s permission, get recognition of live and prerecorded speech, and receive transcriptions, alternative interpretations, and confidence levels.

You can check out the video presentation at WWDC in this link.

Ti.Speech can be used to convert some MP3 file into text. In this example we are translating a MP3 file recorded by Steve Jobs saying – “There is one more thing I forgot to tell you that this is really important”.

Demo

ti-speech

README

These instructions are being shipped with the module, so you can check later on your README file.

LoopModules – Ti.Speech

This HyperLoop module expose some of coolest functionality of iOS 10 – Speech Recognition.
As Apple describes the API -> With the user’s permission, get recognition of live and prerecorded speech, and receive transcriptions, alternative interpretations, and confidence levels.
It exposes the iOS native Speech API
This module only allows you to use standalone files for recognition. For this example you will find a file called “one_more_thing.mp3” in the “assets” folder.

1 – Requirements

This project uses HyperLoop. We recommend you to read the basics of HyperLoop in the links below before proceeding any further in this README.
iOS: Hyperloop_for_iOS-Programming_Guide
Android: Hyperloop_for_Android_Programming_Guide

HyperLoop does a pretty good job in allowing you to use Objective-C / Swift with Javascript syntax, but that doesn’t mean that you won’t
need to learn Objective-C / Swift if you want to customise the module / create your own. For that reason we highly recommend you to
learn the basics of Objective-C / Swift.
In the long run that will make your job easier, since Objective-C is far from being an easy language to understand at the first sight.

2 – Environment setup

This module was tested and developed with the following environment:

  • Titanium SDK 6.0.0.v20161017194738
  • HyperLoop 2.0.0
  • XCode 8.0

3 – Creating a HyperLoop-enabled project

  • Create a new Alloy project like you would normally do. (Don’t forget to a hyperloop-enabled project)
  • Take a look at the example tiapp.xml file that you’ve received from us. Your tiapp.xml should have the same properties defined in this example
    otherwise you’ll face some issues while building your project later on.
    Don’t forget to change the App GUID in the provided tiapp.xml file to your original App GUID!
  • Copy the controller, styles and view files + the “libs” folder provided with this module to your project’s “/app” folder.

4 – Usage

You’ll find inside this zip a very simple example of controller that you can copy to your HyperLoop-enabled project and start playing with it.
To use this module all you have to do is to use the function “recognize” shipped in the lib TiSpeech.

That’s an example of code:

TiSpeech.recognize({
  url: "one_more_thing.mp3",
  progress: function(e) {
    Ti.API.info(e.value);
  }
});

After following all the steps above you should have the project up and running without any problems.
HyperLoop DOES NOT work with LiveView as of now, so you will need to rebuild your project every time you change anything.

Support

One of the things we want to offer you as a reward for joining LoopModules is the ability to contact us to discuss and get help with problems that you may come across.
We’ve tested this module a lot of times and we want to deliver something that will work for everyone (as long as the environments are the same, e.g. SDK, HL version, and so on).
If you come across one of the following:

  • Bugs
  • Suggestions
  • Issues while compiling this module

Feel free to contact us at contact@loopmodules.com.