Skip to main content

TTS Plugin

Legacy documentation

This page contains deprecated documentation and is no longer actively maintained. A new version of this documentation is now available here.

TV platforms
Web TV

DIVA TTS Plugin​

The DIVA TTS plugin is an out-of-the-box implementation of text to speech for supporting voice over for accessibility.

Installation​

  1. Add @deltatre-vxp:registry=https://npm.pkg.github.com to your .npmrc file
  2. Install the SDK
       npm intall --save-dev @deltatre-vxp/diva-plugin-tts

Usage​

Reactjs version​

import { Tts, Platform } from '@deltatre-vxp/diva-plugin-tts';

const tts = new Tts(
process.env.PLATFORM === 'TIZEN' ?
Platform.TIZEN :
process.env.PLATFORM === 'WEBOS' ?
Platform.WEBOS :
Platform.WEB
);

// ...

<DivaWebTV
// ...
onTtsMessage={tts.onTts}
// ...
/>

Vanilla js version​

import { Tts, Platform } from '@deltatre-vxp/diva-plugin-tts';

const tts = new Tts(
process.env.PLATFORM === 'TIZEN' ?
Platform.TIZEN :
process.env.PLATFORM === 'WEBOS' ?
Platform.WEBOS :
Platform.WEB
);

const diva = new divaWebtv.createDivaWebTV (el, {
// ...
onTtsMessage: tts.onTts
// ...
});