create swift mobile apps with ibm watson services · • in this section, you’ll learn how to...

16
© 2016 IBM Corporation Create Swift mobile apps with IBM Watson services

Upload: truongnga

Post on 26-Sep-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

Create Swift mobile apps with IBM Watson services

Page 2: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

Create a Watson sentiment analysis app with Swift

Page 3: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix to that app. More specifically, you’ll learn how to:

– Create a Single View Application in Swift– Create a graphical user interface (GUI) for iOS – Add the IBM Watson iOS SDK to our project– Create a Watson service and get the key token for it– Run the app to access the Watson service and display the output on your

smartphone

Learning objectives

3

Page 4: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• Before your start this section, you should install and configure the following prerequisites:

– A MacBook running OS X El Capitan– The Xcode 7.3 development environment or later– A Bluemix account

• Familiarize yourself with the Watson Developer Cloud iOS SDK, which you will use in the labs: https://github.com/watson-developer-cloud/ios-sdk/blob/master/README.md

Prerequisites

4

Page 5: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• Watson AlchemyAPI cognitive service can: – Identify attitude, opinions, or feelings in the content that is being analyzed – Calculate overall sentiment in a document, sentiment for user-specified

targets, entity-level sentiment, quotation-level sentiment, directional-sentiment, and keyword-level sentiment

• The combination of these capabilities supports a variety of use cases ranging from social media monitoring to trend analysis.

• The app that you build in this section will help you determine the sentiment of a person’s textual input.

Sentiment analysis

5

Page 6: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

Mobile application layers

Watson Developer Cloud SDK for iOS

iOS app

Watson service: AlchemyAPIFunction: sentiment analysis

Page 7: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

Create an Watson photo recognition app with Swift

Page 8: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• In this section, you’ll learn how to create a mobile image recognition app for iOS. The app can consume an image URL and provide information about what the image contains. This is a very popular type of mobile app.

• You'll learn how to:– Create a Single View Application in Swift– Create a graphical user interface (GUI) for iOS – Add the Bluemix IBM Watson iOS SDK to your project– Create a Watson Visual Recognition service instance and get the key token for it

• Run the app to access the Watson service and display the output on our smartphone

Learning objectives

8

Page 9: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• Be sure that you complete the previous lab “Create a Watson sentiment analysis app with Swift.”

Prerequisites

9

Page 10: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• The Watson Visual Recognition service can: – Understand the content of images or video frame, answering the question

“What is in this image?” – Create custom classifiers to develop smart applications– Help you understand the contents of an image

Visual recognition

10

Page 11: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

How the app works

• For this app, you submit an image, and the service returns scores for relevant classifiers representing things such as people, objects, events, and settings.

• Check out the Visual Recognition demo at http://visual-recognition-demo.mybluemix.net/

11

Page 12: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

Create a Watson text-to-speech app with Swift

Page 13: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• In this section, you’ll learn how to write a mobile app in Swift for iOS and add the IBM Watson Text to Speech service from Bluemix.

• More specifically, you'll learn how to:– Create a Single View Application in Swift– Create a graphical user interface (GUI) for iOS – Add the IBM Watson iOS SDK to your project– Create the Watson Text to Speech service and get the key token for it

Learning objectives

13

Page 14: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• Complete the previous labs:– “Create a Watson sentiment analysis app with Swift”– “Create an Watson photo recognition app with Swift “

Prerequisites

14

Page 15: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• The Watson Text to Speech service is designed for streaming low-latency synthesis of audio from written text.

• The Watson Text to Speech service provides a REST API to synthesize speech audio from an input of plain text. After the text is analyzed in real-time, the audio is streamed back to the client.

• The service synthesizes natural-sounding speech from input text in a variety of languages and voices that speak with appropriate cadence and intonation.

• Multiple voices, both male and female, are available in these languages: – Brazilian Portuguese, English, French, German, Italian, Japanese, and Spanish.

• You can also control the pronunciation of specific words.

Watson Text to Speech service

15

Page 16: Create Swift mobile apps with IBM Watson services · • In this section, you’ll learn how to write a mobile app in Swift for iOS and add an IBM Watson cognitive service from Bluemix

©2016IBMCorporation

• Enter text on your smartphone and listen to the voice output.

• Check out the demo at https://www.ibm.com/watson/developercloud/text-to-speech.html.

How the app works

16