PubNub Integration

IBM Watson: Text-to-Speech

In-app chat

In-app chat

Last Updated:

2016/08/01

Author:

PubNub

Get IBM Watson Text to Speech API Keys

Convert message text to audible speech in 7 different languages

Text to Speech from IBM Watson provides an API for converting message text to audible speech, for a wide variety of languages and voices, and customizable cadence, emotion, and tone.

The IBM Watson Text to Speech block converts text in your realtime data streams, and converts that input text to natural-sounding speech. For example, a chat app could process messages in one language, and output them verbally, in a different language.

Walkthrough

This block adds a link to the original message in before publish event handler. The block performs calls to IBM Watson Text to Speech API with the auth credentials and query parameters required to convert the message text to an audio file.

To learn more about IBM Watson Text to Speech API and get your own API credentials, visit the IBM Watson Text to Speech API homepage.

Input

Publish a message text on input channel. Input Channel: text-to-speech-chat

{ 
    "text": "Hi"
}

Output

The url to a speech file is added to the JSON payload. Output Channel: text-to-speech-chat

{ 
    "text": "Hi", 
    "speech": <URL>
}

Feedback & Support

Need help? Contact PubNub Support.


Talk to an expert

Contact Sales