Open-source speech recognition + TTS for iPhone (2) getting started with openears

Source: Internet
Author: User
Getting started with openearsconventions used in these instructions:

[Openears]
Will be used to mean the path on your
System to the openears folder after you downloaded and unzipped it. So,
If you downloaded it to your documents folder and your username is
"Username", [openears] Means

/Users/username/Documents/OpenEars
What we'll be doing:

Downloading all of the files needed by openears, moving them
Place, and running a script to set up the openears, pocketsphinx, and
Flite static libraries for your app. Then we'll set the openears Project
To a valid SDK for getting started with only if that is necessary.

Please note, instructions are now for xcode 4 only. It is still possible to download the previous version of openears
And its distribution contains instructions for xcode 3 which shocould be
Very helpful for figuring out how to install openears. 91 in xcode 3.
Another option is to run the sample app, which shoshould work as well in
Xcode 3 as xcode 4, and examine how it is configured. I wish I had
Time available to support and fully document both, but since I don't,
I'm opting for xcode 4 Support and documentation moving forward since
The final version has been out for months now and it's a free upgrade
For developers with lots of useful new features. You can ask questions
About xcode 3 installin the forums if you 've already tried following
The instructions in the 0.902 download and I'll try to answer if there
Is time.

Before you begin:

Download the following files:

The openears distribution archive here
.

The sphinxbase 0.6.1 distribution archive here
.

The pocketsph00000.6.1 distribution archive here
.

The Flite 1.4 distribution archive here
.

The Flite 8 kHz voices distribution archive here
.

And unzip the openears.zip archive in the location in which you 'd like it to remain.

Step 1:
Put the sphinxbase 0.6.1 archive,
Pocketsph00000.6.1 archive, The Flite 1.4 archive, and the Flite 8 kHz
Voice archive in the following folder:

[OPENEARS]/CMULibraries

And unarchive them there. If you like, you can move the original
Tar.gz archives somewhere else at this point if you don't have your
Preferences set to automatically delete archives after unpacking them.
That cmulibraries folder shold look like this when you're done:

Important: The Unarchived folders must be named as follows:

  • Flite-1.4-release
  • Pocketsphinx-0.6.1
  • Sphinxbase-0.6.1
  • WinCE

If they are, you can proceed to step 2. If they aren't, and they are
Named something else because the downloaded versions are different,
Please download the correct version. openears 0.91 only works
Flite 1.4 and pocketsph00000.6.1 and sphinxbase 0.6.1. If they are
Named something else because of something that happened
Unarchiving (for instance, there was already an Unarchived folder there
So the number "2" was appended onto the end) just rename them so they
Match the filenames above.

Step 2:
Open terminal and run the following two commands:

cd [OPENEARS]/CMULibraries

And then

./InstallOpenEars.pl

The Install script will just pause for a moment and finish if
Everything went fine. If so, you can proceed to Step 3. If everything
Didn't go fine you will have some errors in terminal. If you have any
Errors, make sure of the following three things:

A. You are working with fresh Unarchived downloads of the five
Folders. A likely error-causing case is making an installation Attempt
That doesn't work out, and then instead of starting over fresh,
Re-running the installation script on the same folders a second time.

B. You have four Unarchived folders in your cmulibraries folder
Called Flite-1.4-release, pocketsphinx-0.6.1, sphinxbase-0.6.1, and
Wince as well as the install script installopenears. pl that ships
Openears.

C. You executed the command:

cd [OPENEARS]/CMULibraries

In terminal (being sure to replace [openears] with the actual path
Your openears distribution folder !) Before executing the command:

./InstallOpenEars.pl

Step 3:
Open openearssampleproject. xcodeproj at [openears]
/Openearssampleproject. xcodeproj
And run and install it on a device. openears is possible to run on
Simulator, but since its low-latency driver isn' t compatible with
Simulator, I have provided an alternative simulator-compatible driver
A convenience so that you can debug recognition logic. However,
Recognition on the device is much better and I only offer driver support
For the device, so it is best to get used to running openears on
Device, and it isn' t possible to evaluate openears 'Recognition Quality
By running it on the simulator since it uses a completely different
Audio driver.

Make sure that you have selected openearssampleproject in the Scheme
Drop-down menu in the upper left and not openears (which will only cause
The library to be compiled ).

This shoshould be all that most developers need to do. If this worked
For you, congrats, you have configured the static library and you are
Ready to move on to running ing your app for openears
.

If (and only if) You get multiple build errors, you may have to take
One more step of assigning the base SDK for the library and sample app.
From the finder, double-click on openearslibrary. xcodeproj-not
Sample app project, the Library Project found

[OPENEARS]/OpenEarsLibrary/OpenEarsLibrary.xcodeproj

In the project navigator, highlight the blue project icon. Then
Highlight the blue openearslibrary icon under the project header in
Left column of the editor. Then select the tab build settings. Then,
Select a valid iOS device SDK for the setting base SDK under the column
Openearslibrary so that the resolved column displays a valid iOS device
SDK. Close openearslibrary. xcodeproj.

Next, from the finder, double-click on openearssampleproject. xcodeproj-not the library, the sample app found

[OpenEars]/OpenEarsSampleProject/OpenEarsSampleProject.xcodeproj

In the project navigator, highlight the blue project icon. Then
Highlight the blue openearssampleproject icon under the project Header
In the left column of the editor. Make sure you highlight
Openearssampleproject and not openearslibrary if openearslibrary is
Visible. Then select the tab build settings. Then, select a valid IOS
Device SDK for the setting base SDK under the column
Openearssampleproject so that the resolved column displays a valid IOS
Device SDK.

It shoshould now be possible to run the sample app without errors.
Before running it on a device, make sure that you have selected
Openearssampleproject in the scheme drop-down menu in the upper left and
Not openears (which will only cause the library to be compiled ).

If you get a single codesign error, you may need to go to
Developer portal and create a provisioning profile for the sample app
That is valid for your device and developer identity (APP provisioning
Is beyond the scope of these instructions), but I think it ought to be
Able to work out of the box in most cases.

If you have any remaining issues you can check out the FAQ/support
Page, otherwise move on to keep ing your app for openears

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.