This the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Developer Center

Welcome to the Wordly Developer Center!

Here you will find pointers and documentation for integrating Wordly with your platform or application.

If you still have questions, please contact us at contact@wordly.ai.

1 - Languages

Languages Supported by Wordly

Wordly supports a number of languages and the codes for each language are listed below.

Speaker Languages

These language codes can be used in all Wordly integrations and APIs:

Language Code Language Name
bn Bengali
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
nl Dutch
en English (US)
en-AU English (AU)
en-GB English (UK)
fr French (FR)
fr-CA French (CA)
de German
hi Hindi
it Italian
ja Japanese
ko Korean
pt Portuguese (PT)
pt-BR Portuguese (BR)
ru Russian
es Spanish (ES)
es-MX Spanish (MX)

Attendee Languages

Along with the languages above, these languages are supported in the Attend iframe and endpoints:

Language Code Language Name
ar Arabic
cs Czech
he Hebrew
id Indonesian
pl Polish
ro Romanian
sv Swedish
tl Tagalog
ta Tamil
th Thai
vi Vietnamese

2 - iFrame Integration

Receiving Translations in an iFrame

Often, the easiest way to integrate Wordly translations into a platform or web application is to embed the ‘attend’ client in an HTML iFrame.

iFrame Embed

The basic HTML code for embedding Wordly translations in an iframe uses the standard HTML iframe tag:

    <iframe src="url" />

You place this in your application wherever you would like Wordly translations to appear. Typically you want to set width and height so the iframe will fill the space you leave for it. This can be done directly in the iframe tag, or via a class attribute. For example:

    <iframe src="url" width="100%" height="300px" />

Source URL

The url to use as the source is crafted from the Wordly session that you want to show your users. The basic format is:

    https://attend.wordly.ai/frame/<session id>

for example, something like:

    https://attend.wordly.ai/frame/ABCD-1234

where ‘ABCD-1234’ would be replaced with a Wordly session ID obtained from the Portal at https://portal.wordly.ai.

Source URL parameters

The url takes a number of optional arguments that can be used with sessions that require a passcode and to change the way the iframe content is displayed:

  • key: the session passcode if one is required to attend. Open sessions do not require a passcode.
  • lang: the initial language code of the translations for this user. This is not often used. The translation languge will default to English or whatever the user has chosen in the past. See languages for the list of language codes.
  • fgcolor: an HTML color for the text in the iframe. This value can be any valid HTML color name or a custom hex RGBA color. The default is white.
  • bgcolor: an HTML color for the background of the iframe. This value can be any valid HTML color name or a custom hex RGBA color. The default is black.
  • fgsize: an HTML size value for the text in the iframe. This value can be any valid HTML text size, including units. This defaults to the container text size and is not often used.
  • tags: a boolean value that can be set to “false” to prevent the display of speaker names in the iframe. This defaults to “true”.
  • speakerLanguage: a boolean value that can be set to “false” to hide the display of the language the speaker is using. This defaults to “true”.
  • enableTTS: a boolean value that can be set to “true” to enable text-to-speech support. When this value is ‘true,' new buttons are added to the bottom bar allowing the user to select a voice for the text to be spoken out loud, and a mute/unmute button. This defaults to “false“.
  • finalOnly: a boolean value that can be set to “true” to change the default value for the “Show only complete phrases” user setting. When this value is ‘true,' only completed translations will be shown to the user and partial translations will be suppressed.
  • hide: a list of Wordly language codes to hide from the user. This parameter is a string of codes separated by commas. The specified languages will be removed from the various menus presented to the user. For example: ?hide=en,es,fr will remove English, Spanish, and French from the language menus. See languages for the list of language codes.
  • show: a list of Wordly language codes to show to the user. This parameter is a string of codes separated by commas. The specified languages will be the only ones included in the various menus presented to the user. For example: ?show=en,es,fr will reduce all language menus to just English, Spanish, and French. See languages for the list of language codes.

Examples:

A url to display session ‘DCBA-4321’ in Spanish with big, green text would be:

    https://attend.wordly.ai/frame/DCBA-4321?lang=es&fgcolor=00FF00&fgsize=5em

and this emebedded in an iframe in your HTML might look like:

    <iframe src="https://attend.wordly.ai/frame/DCBA-4321?lang=es&fgcolor=00FF00" width="100%" />

A url to display session “DCBA-4321” with TTS enabled:

    https://attend.wordly.ai/frame/DCBA-4321?enableTTS=true

and this emebedded in an iframe in your HTML might look like:

    <iframe src="https://attend.wordly.ai/frame/DCBA-4321?enableTTS=true" width="100%" />

3 - RTMP Streaming

Streaming Content to Wordly in Real Time

A common way for users and developers to send speech to Wordly for translation is via RTMP streaming, This can be useful when using Wordly to translate a conference session or webinar, or when embedding Wordly in an iframe.

RTMP Streaming

The streaming connection to wordly is via RTMP which requires two things:

  • A streaming URL
  • A stream key

Streaming URL

The Wordly streaming URL is:

    rtmps://media.wordly.ai/live

This will open an encrypted stream to the Wordly RTMP server.

There is an optional, unencrypted RTMP streaming link. However, we strongly encourage RTMPS as it is more secure. If you cannot use the RTMPS link for some reason, the unencrypted streaming URL is:

    rtmp://media.wordly.ai:8085/live

Stream Key

The stream key tells Wordly the session you are streaming to. This will be the same session as using in the iframe embed (if you are using an iframe). The stream key must also include the passcode to enable access to that session. For example:

    ABCD-1234_987654

Where AABCD-1234 is the Wordly session ID and 987654 is the passcode for the session.

Stream keys are generated automatically when a session is scheduled in the Wordly Portal, and you can find them and the streaming URLs in the session Streaming Shortcuts at https://portal.wordly.ai:

Portal Streaming Shortcuts

Adding a delay

Sometimes you may need to delay the stream you are sending to Wordly in order to match the delay of the video player in your integration. You add a delay as a parameter attached to the stream key. The delay is in milliseconds to allow fine tuning if needed.

For example you can add a delay of 15 seconds to the stream key above like this:

    ABCD-1234_987654?delay=15000

or if you prefer obscurity you can attach it to the end of the stream key like this:

    ABCD-1234_987654_15000

Adding a language

When you stream to a Wordly session, Wordly will expect speech in the stream to be in the language specified in the session. If the content is actually in a different language, you can override it in the stream key as an additional parameter. See languages for the list of language codes.

For example, to tell Wordly the content of the stream is in French, you can use a stream key like this:

    ABCD-1234_987654?lang=fr

or it can be appended to the stream key like this:

    ABCD-1234_987654_fr

You can also combine the language and delay parameters:

    ABCD-1234_987654?delay=15000&lang=fr

or

    ABCD-1234_987654_fr_15000

The language parameter is not often used. The current streaming language can be changed while streaming is active using the streaming controls in the Portal.

Streaming controls

You can open the live streaming controls in the Portal by clicking on the gear icon next to the session that you are streaming to:

Portal Streaming Controls

With these controls you can change the language Wordly is expecting the stream speakers to be using. To change the language, pick the new language in the drop-down selector and click the red “Change” button:

Change Streaming Language

Each time a new language is used, a blue quick-change button appears. The streaming language can be changed back to a previous language by clicking one of these buttons.

Finally, when streaming is complete, the “End” button can be used to end the Wordly session.