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 real-time 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.
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.
Publish a message text on input channel. Input Channel: text-to-speech-chat
{ "text": "Hi" }
The url to a speech file is added to the JSON payload. Output Channel: text-to-speech-chat
{ "text": "Hi", "speech": <URL> }
Need help? Contact PubNub Support.
Copyright (c) 2018 PubNub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.