Skip to content
Kalonji Bankole edited this page Sep 11, 2018 · 6 revisions

Short Name

Deploy a Serverless Multilingual Conference Room

Short Description

This journey proposes a method to create a communications channel that’ll allow clients who speak different languages to seamlessly communicate with each other. This can be particularly useful in meetings rooms and conference calls where the participants are located in different countries, as translated subtitles or audio can be generated and delivered in real time.

Offering Type

Cloud

Introduction

Create a multi-lingual conference room using Watson text to speech. OpenWhisk actions and a MQTT messaging broker are also used in this scenario.

Author

By Kalonji Bankole

Code

https://github.com/IBM/serverless-language-translation

Demo

https://translation-mqtt.mybluemix.net

Video

https://www.youtube.com/watch?v=eXY0uh_SeKs

Overview

The pattern leverages the MQTT messaging protocol, which allows for each client to publish and “subscribe” to one or more channels. The channel makeup determines each client’s requested language and payload type, (fromClient/french/audio, for example).

The channel that each submitted message is sent to determines the sequence of cloud functions that will be called; for example, submitting a message to fromClient/english/audio will run the audio payload through Watson’s speech to text service, forward that result to the translation service, and then distribute the translated result to all listening clients

When the reader has completed this journey, they will understand how to:

  • deploy OpenWhisk actions/triggers
  • interact with the Watson IoT platform
  • set up a CloudFoundry application

Flow

Architecture

  1. Message received from a client, which can be a web browser, CLI, Openwhisk action, SMS text, etc.
  2. If message payload contains an audio file, it is transcribed to text.
  3. Transcribed text is translated to other supported languages.
  4. If message sent via SMS, sender phone number is added to an etcd key/value store. etcd is used here to maintain a list of subscriber’s phone numbers, as well as their respective languages. An adjustable TTL value is used here to remove numbers from the store if the subscriber does not participate in the conversation for 300 seconds.
  5. Translated messages/audio streams are published to various channels on the MQTT broker, which then distributes the messages amongst subscribing clients.

Included components

  • OpenWhisk: Execute code on demand in a highly scalable, serverless environment.
  • Watson Text to Speech: Converts written text into natural sounding audio in a variety of languages and voices.

Featured technologies

  • Messaging: Messaging is a key technology for modern applications using loosely decoupled architecture patterns such as microservices.
  • Node.js: An open-source JavaScript run-time environment for executing server-side JavaScript code.
  • Serverless: An event-action platform that allows you to execute code in response to an event.

Blog

Blog Title

Chat room translation using Watson, MQTT, Openwhisk, and Twilio

Blog Author

Kalonji Bankole

Blog Content

https://medium.com/kkbankol-events/the-motivation-behind-this-particular-project-comes-from-playing-one-of-my-favorite-android-games-76c92b27c8e8

Links