building a siri like application on ios
DESCRIPTION
A siri like application to find near by hotel, restaurants using Nuance Mobile SDK.TRANSCRIPT
![Page 1: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/1.jpg)
Building A Siri-like ApplicationSubhransu Behera (Subh) - iOS Application Architect in SAP
Twitter : @subhransuBlog : http://subhb.orgEmail : [email protected]
iOS Dev Scout - May Meetup
Wednesday, May 30, 12
![Page 2: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/2.jpg)
About Me• iOS and Ruby Developer
• Have passion for Mobile, Web and Smart TV Apps.
• Started as a Linux Developer, fell in love with Ruby, happily married to iOS
• M.S. in Software Systems from BITS, Bachelors in Information Technology from BPUT, Graduated from Founder Institute
• Worked both in early stage startup and fortune 500 companies including one from MIT, Media-Labs. Currently working SAP APJ Mobility CoE making enterprises run their mobile Apps.
Wednesday, May 30, 12
![Page 3: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/3.jpg)
When “Siri” Came !
Wednesday, May 30, 12
![Page 4: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/4.jpg)
No Official Siri APIs Yet
• Needed to use it for an Electric Vehicle Application
• There are few Open Source SDK:
• OpenEars: http://www.politepix.com/openears
• iSpeech: https://www.ispeech.org/developers
• Dragon Speech Kit (Nuance) : http://dragonmobile.nuancemobiledeveloper.com/public/index.php?task=home
Wednesday, May 30, 12
![Page 5: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/5.jpg)
Why Nuance?
• Multiple language support (Supports speech recognition in 23 international languages)
• They Make “Voice” really work.
• Suggestion and Recommendation engine is pretty strong.
• Have both Speech-to-Text and Text-to-Speech capabilities
• Supports Multiple Platforms (iOS, Android, Windows Phone)
• They are the guys behind Siri?
Wednesday, May 30, 12
![Page 6: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/6.jpg)
Tiers & Pricing
Wednesday, May 30, 12
![Page 7: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/7.jpg)
Free for 90 Days
Wednesday, May 30, 12
![Page 8: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/8.jpg)
1. Signup and Download Dragon Mobile SDK from Nuance Developer Portalhttp://dragonmobile.nuancemobiledeveloper.com
Wednesday, May 30, 12
![Page 9: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/9.jpg)
Get Application Key from Email
Wednesday, May 30, 12
![Page 10: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/10.jpg)
ClassClass References
SKRecognizer - Manages entire recognition process including recording and server communication
SKRecognition - Contains recognition results returned from SKRecognizer
SKVocalizer - Defines server based text to speech implementation
SpeechKit - Core class providing setup and utility methods. Meant for Core Networking, Recognition, Audio System components
Wednesday, May 30, 12
![Page 11: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/11.jpg)
ProtocolsProtocol References
SKRecognizerDelegate - Defines the messages sent to a delegate of the SKRecognizer class
SKVocalizerDelegate - Defines the methods sent by SKVocalizer class during speech synthesis process
SpeechKitDelegate - Defines the messages sent to a delegate object registered as part of the call to setupWithID.
Wednesday, May 30, 12
![Page 12: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/12.jpg)
How it Works
Wednesday, May 30, 12
![Page 13: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/13.jpg)
Recognizing Speech
Wednesday, May 30, 12
![Page 14: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/14.jpg)
Sample Speech Recognition App
Wednesday, May 30, 12
![Page 15: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/15.jpg)
Step-by-step Guide
• Open the file Classes/DMRecognizerViewController. Replace the SpeechKitApplicationKey[] value with your key.
• In the setupWithID:host:port:useSSL:delegate:`` method, replace the ID parameter with your ID.
• You should also verify that the host and port provided to that method match the host and port provided in the portal.
• You can now run the application: connect your device and select Build and Run.
Main Recognition View
Wednesday, May 30, 12
![Page 16: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/16.jpg)
Main Recognizer View
This view has 4 sections
• Voice Interface contains a multi-purpose button for controlling the recognition process and has a result field.
• Recognition Type allows for the selection between the two default recognition models: search and dictation.
• Audio Level provides a basic VU meter display.
• Alternatives displays the complete list of recognition results.
Wednesday, May 30, 12
![Page 17: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/17.jpg)
Recognition Logic1. On viewDidLoad of main view, Speech Kit
framework is configured by calling setupWithID:host:port:useSSL:delegate method.
2. On tap of "Record" button, a new SKRecognizer is created with the initWithType:detection:language:delegate: method.
3. When the recording finishes, the delegate method recognizerDidFinishRecording: is called, and the button is updated.
4. On a successful completion, the method recognizer:didFinishWithResults: returns with an SKRecognition object that contains the list of recognition results.
5. The top result, retrieved with the firstResult method, is listed in text box. The complete list of results, accessed through the results property, is displayed in the large text field.
6. If an error occurs, the method recognizer:didFinishWithError:suggestion: is called, and both the error and suggestion methods are presented to the user.
Wednesday, May 30, 12
![Page 18: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/18.jpg)
Recognition with Suggestions
Wednesday, May 30, 12
![Page 19: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/19.jpg)
Let’s build our Own App
Wednesday, May 30, 12
![Page 20: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/20.jpg)
Nearby Restaurants Nearby Stations
Download Source-code from: https://github.com/subhb/FindNearBy-Siri
Speak “Restaurant” or “Station” to find nearby results
Wednesday, May 30, 12
![Page 21: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/21.jpg)
Twitter Search App Using Nuance
http://www.youtube.com/watch?v=ZJILw2iEprE
Wednesday, May 30, 12
![Page 22: Building a Siri Like Application on iOS](https://reader033.vdocuments.site/reader033/viewer/2022042607/554dc83db4c905c2488b521b/html5/thumbnails/22.jpg)
Thank You
Twitter : @subhransuBlog : http://subhb.orgEmail : [email protected]
Wednesday, May 30, 12