14.5 Watson Developer Cloud Python SDK

In this section, you’ll install the modules required for the next section’s full-implementation Watson case study. For your coding convenience, IBM provides the Watson Developer Cloud Python SDK (software development kit). Its watson_developer_cloud module contains classes that you’ll use to interact with Watson services. You’ll create objects for each service you need, then interact with the service by calling the object’s methods.

To install the SDK26 open an Anaconda Prompt (Windows; open as Administrator), Terminal (macOS/Linux) or shell (Linux), then execute the following command27:

pip install --upgrade watson-developer-cloud

Modules We’ll Need for Audio Recording and Playback

You’ll also need two additional modules for audio recording (PyAudio) and playback (PyDub). To install these, use the following commands28:

pip install pyaudio
pip install pydub

SDK Examples

On GitHub, IBM provides sample code demonstrating how to access Watson services using the Watson Developer Cloud Python SDK’s classes. You can find the examples at:

https://github.com/watson-developer-cloud/python-sdk/tree/master/examples

tick mark Self Check

  1. (True/False) The Watson Developer Cloud Python SDK’s watson_developer_cloud module contains classes for interacting with each of the Watson services.
    Answer: True.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.159.192