The global Call for Code is well underway, we want to share some visual recognition models which could help you. These AI models can operate on the edge, which could be particularly useful for this years’ theme: disaster preparedness. How could visual recognition help in relief work? From satellite and drone imagery analysis, to classifying...
Deploy a serverless multilingual conference room
Create a communications channel to allow clients who speak different languages to seamlessly communicate with each other
This developer pattern proposes a method to create a communications channel to allow clients who speak different languages to seamlessly communicate with each other. This can be particularly useful in meeting 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.
Have you ever wished there was a way for online game teammates who speak different languages to communicate effectively? Or how about in chat rooms with many clients, such as a Slack/Sametime/Zoom chat group? Live broadcasts like on YouTube or Twitch? Or maybe online classes/webinars? This developer pattern proposes a way to do just that: create a communications channel to allow different-language clients to seamlessly communicate with each other.
This 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 the Watson® Speech to Text service, forward that result to the translator service, and distribute the translated result to all listening clients.
When you have completed this pattern, you will better understand how to:
- Deploy IBM Cloud Functions actions/triggers
- Interact with the Watson IoT platform
- Set up a Cloud Foundry application
- Message received from a client, which can be a web browser, CLI, OpenWhisk action, SMS text, etc.
- If message payload contains an audio file, it is transcribed to text.
- Transcribed text is translated to other supported languages.
- If message is sent via SMS, sender phone number is added to an etcd key-value store. etcd is used here to maintain a list of subscribers’ 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.
- Translated messages/audio streams are published to various channels on the MQTT broker, which then distributes the messages among subscribing clients.