Speaking Multiple Languages

When working with multinational callers, American English might not be the language or accent you want to use for your application's prompts. Tropo provides many different voice options to choose from, and it's all controlled using the voice parameter:

require 'tropo-webapi-ruby'
require 'sinatra'

post '/index.json' do
  t = Tropo::Generator.new
  t.say "Hello, how are you?", :voice => "kate"

var http = require('http');
var tropo_webapi = require('tropo-webapi');

var server = http.createServer(function (request, response) {
	var tropo = new TropoWebAPI();

	// (value, as, name, required, voice)
	tropo.say("Hello, how are you?.", null, null, null, null, "kate");


require 'tropo.class.php';

$tropo = new Tropo();
$tropo->say("Hello, how are you?", array("voice" => "kate"));

from itty import *
from tropo import Tropo

def index(request):

    t = Tropo()
    t.say("Hello, how are you?", voice = "kate")
    return t.RenderJson()

run_itty(server='wsgiref', host='', port=8888)
               "value":"Hello, how are you?",

The previous example shows how to speak using Kate, a British English voice. We also have Daria, Magnus, Karen and quite a few others ready for you. A complete list appears below.

Language Female Voice Male Voice
Arabic Laila Maged, Tarik
Bahasa Damayanti
Basque Miren
Bulgarian Daria
Cantonese Sin-ji
Catalan Montserrat Jordi
Czech Iveta, Zuzana
Danish Sara Magnus
Dutch Claire Xander
English (Australian) Karen Lee
English (Indian) Veena
English (Irish) Moira
English (Scottish) Fiona
English (South African) Tessa
English (UK) Kate, Serena Daniel, Oliver
English (US) Allison, Ava, Samantha, Susan, Veronica, Vanessa (Default) Tom, Victor
Finnish Satu Onni
French Audrey, Aurelie Thomas
French (Canadian) Amelie, Chantal Nicolas
Galician Carmela
German Anna, Petra Markus, Yannick
Greek Melina Nikos
Hebrew Carmit
Hindi Lekha
Hungarian Mariska
Italian Alice, Federica Luca, Paola
Japanese Kyoko Otoya
Korean Sora
Mandarin Tian-tian
Mandarin (Taiwanese) Mei-jia
Norwegian Nora Henrik
Polish Ewa, Zosia Krzysztof
Portuguese Catarina, Joana Joaquim
Portuguese (Brazilian) Luciana Felipe
Russian Katya, Milena Yuri
Slovak Laura
Spanish (Argentinean) Diego
Spanish (Castillian) Monica Jorge
Spanish (Colombian) Soledad Carlos
Spanish (Mexican) Angelica, Paulina Juan
Swedish Alva, Klara Oskar
Thai Kanya
Turkish Yelda Cem
Valencian Empar

If you need to recognize voice input as well, you probably need to define which language Tropo is listening for using the recognizer parameter, which we cover next.

For more information on SSML, please review this documentation page.