Development and practice of the language recognition program for IOS Siri (Nuance Technology)

Source: Internet
Author: User

After the iphone4s of Siri's technology, Siri's success was in addition to the leadership of Apple's Steve Jobs, and Siri's voice-recognition technology provider nuance the company.
Nuance is the largest company specializing in speech recognition software, image processing software and input method software development and sales. In addition to the already red-hot Siri,nuance also has a record-breaking product, T9 input method, believed that before the Apple iphone popular, uses the Nokia God machine and so on the brand handset user must be very familiar with this.
The language recognition function we have here is based on Nuance ASR technology, and Siri is just an implementation of nuance technology, and Nuance's speech recognition technology is much more than that.
In addition to English, French, German and other Western European languages, Chinese, Cantonese, Japanese and other East Asian languages are included in it.


Before you start, you need to register a developer account with nuance, get a applicationkey, and download the SDK, below is a description of the SDK.

Http://www.nuance.com/for-developers/dragon-mobile-sdk/index.htm

After that, you can use and develop language recognition programs, the SDK includes iOS and Android two versions, iOS release earlier, more stable now, and a lot of iOS app based development, currently offers free and commercial version, if you want to commercial development, recommend to buy his business solutions.

Here are the basic steps and code snippets for developing language recognition
1, import the speech recognition framework
Speechkit.framework

2, set Speechkitapplicationkey

The code is as follows Copy Code
Please copy from the Nuance message
Const unsigned char speechkitapplicationkey[] =
{0x47, 0xBE, 0x50, 0x57, 0x05, 0xde, 0x0f, 0x0e,
0x70, 0x63, 0x10, 0x4b, 0xb2, 0xad, 0XFB, 0xAB,
0x14, 0x96, 0x99, 0x0d, 0x8e, 0x50, 0x2c, 0x1a,
0xb2, 0x5b, 0xf6, 0x76, 0x7d, 0xd8, 0xd5, 0xc5,
0x97, 0x25, 0x1c, 0x9c, 0x03, 0x2c, 0xaa, 0x74,
0x8f, 0xba, 0XBF, 0x42, 0x67, 0xba, 0xed, 0x7b,
0x50, 0x87, 0x88, 0xde, 0xd7, 0xb4, 0xf8, 0x89,
0x10, 0xEF, 0xFF, 0x8d, 0xc7, 0xd5, 0x52, 0x51};

NSString *const speechkitid =@ "XXXX";
NSString *const speechhost = @ "Sandbox.nmdp.nuancemobility.net";

3, instantiate the speech recognition object and set the parameters

The code is as follows Copy Code


Detection type, used to identify and stop recording, can be a short pause, manual control, and other means,
Detectiontype = skshortendofspeechdetection;
Identification type, usually divided into two ways: search and dictation
Recotype = Sksearchrecognizertype;
Identify Japanese, can be EN,DE,FR,ZH_CN, etc.
Langtype = @ "JA_JP";

if (_voicesearch) [_voicesearch release];

_voicesearch = [[Skrecognizer alloc] Initwithtype:recotype
Detection:detectiontype
Language:langtype
Delegate:self];

4, the implementation of the Delegate method

The code is as follows Copy Code

Recording begins, here is the recording begins and the recording process is called
-(void) recognizerdidbeginrecording: (Skrecognizer *) recognizer

The recording completes, the language input completes is recognized, the recording completes
-(void) recognizerdidfinishrecording: (Skrecognizer *) recognizer

Recognition resolution completed, service-side request completed, and results obtained
-(void) Recognizer: (Skrecognizer *) recognizer Didfinishwithresults: (skrecognition *) results

Identify an error occurred
-(void) Recognizer: (Skrecognizer *) recognizer Didfinishwitherror: (nserror *) Error Suggestion: (NSString *) suggestion

Related Article

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.