Feedback
External APIs

IBM Watson: Text-to-Speech

Convert message text to audible speech in 7 different languages
Back to BLOCKS

About IBM Watson: Text-to-Speech

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.

Try it Now
Categories:
External APIs External APIs
Bots & AI
Bots & AI
Chat & Social
Chat & Social
Last Updated:
20160801 at 17:37:12
Event Handler Author:
PubNub
SpeechToTextChat

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>
}

Try PubNub Today

Connect up to 100 devices for Free