Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

DEPRECATED: this repo is no longer actively maintained

License

Notifications You must be signed in to change notification settings

watson-developer-cloud/simple-chat-swift

Repository files navigation

Simple Chat (Swift)

DEPRECATED: this repo is no longer actively maintained. It can still be used as reference, but may contain outdated or unpatched code.

This repository contains an example application to demonstrate the Watson Developer Cloud Swift SDK. It combines the Speech to Text, Conversation, and Text to Speech services to build a voice-to-voice chat app.

The Simple Chat app in action

Tutorial

If you'd prefer to learn by building this app yourself, feel free to follow along with the tutorial.

Project Setup

To run the sample playground or iOS app, be sure to clone the repository and download the Watson Developer Cloud Swift SDK dependency. The dependency will be loaded twice, once as a Git submodule (for use in the playground) and again with Carthage (for use in the iOS app).

$ git clone https://github.com/watson-developer-cloud/simple-chat-swift.git
$ cd simple-chat-swift/simple-chat
$ git submodule init
$ git submodule update
$ carthage update --platform iOS

Provision Services

The sample playground and iOS app both use the Speech to Text, Conversation, and Text to Speech services. Each service must be provisioned. You will need to sign up for a Bluemix account if you do not already have one.

To provision each service:

  1. Open the Bluemix services dashboard.
  2. Select the "Create Service" button.
  3. Select the "Watson" category from the left-hand menu.
  4. Select the service to provision.
  5. Select "Create" to continue. (The default configuration options are fine for this tutorial.)

Credentials

Each of the services you provisioned has its own username and password credentials. The playground and iOS app expect to find these credentials in a Credentials.swift file.

Start by renaming the Credentials.swift.example file in your project directory to Credentials.swift. Then open Credentials.swift in Xcode. This file will record our service credentials.

  1. Open the Bluemix services dashboard.
  2. Select the service whose credentials you would like to record.
  3. Select "Service credentials" from the left-hand navigation menu.
  4. Select "View credentials".
  5. Copy the username and password into Credentials.swift.

Repeat these steps to copy the username and password credentials for the Speech to Text, Conversation, and Text to Speech services.

Resources

Watson Developer Cloud:

Watson Swift SDK:

Swift@IBM:

About

DEPRECATED: this repo is no longer actively maintained

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •