Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
/ TTS-Dashboard Public archive

An interface to house all of our TTS explorations and experiments

Notifications You must be signed in to change notification settings

ftlabs/TTS-Dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTS-Dashboard

##Using the FT Labs text-to-speech service as an API

The FT Labs TTS Dash was not designed to be used as an API, however it can function as such. This document outlines the requests that can be made to the FT Labs Dash in order to synthesise speech from text with Amazon’s Polly service.

Setup locally

  • npm install
  • touch .env

.env

  • Run touch .env to create the required .env file
  • Open your new .env file and add the following variables:

PORT=3009 BASE_URL=http://localhost:3009 OKTA_CLIENT= OKTA_ISSUER= OKTA_SECRET= SESSION_TOKEN=

Where to find OKTA .env vars

  • Get SESSION_TOKEN from LastPass
  • Get details for finding OKTA_ISSUER, OKTA_CLIENT & OKTA_SECRET in LastPass

Launching

  • npm start

Making a request

The request must have the following headers set:

Content-Type: application/json

The body of the request must be a JSON object with the following keys/value pairs:

{ “content” : “The text you wish to have synthesised”, "voice" : "Geraint (Welsh English)" }

A token must be passed as the query parameter token with the request. This is available in the shared FT Labs LastPass folder.

cURL request

curl -H "Content-Type: application/json" -X POST -d '{"content" : "hello","voice" : "Geraint (Welsh English)"}' https://ftlabs-tts-dash.herokuapp.com/service/polly?token=[TOKEN] > temp.mp3

Selecting a voice

The Amazon Poly service has a number of voices that can be used to select text. You can specify which voice to use with voice param in the POST request to /service/polly.

Valid voice options

The following list is the values you must pass to you each voice:

  • Geraint (Welsh English)
  • Gwyneth (Welsh)
  • Hans (German)
  • Marlene (German)
  • Nicole (Australian)
  • Russell (Australian)
  • Amy (British)
  • Brian (British)
  • Emma (British)
  • Raveena (Indian English)
  • Ivy (US)
  • Joanna (US)
  • Joey (US)
  • Justin (US)
  • Kendra (US)
  • Kimberly (US)
  • Salli (US)
  • Celine (French)
  • Mathieu (French)

The case must be respected.

About

An interface to house all of our TTS explorations and experiments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published