Tropo WebAPI Development Guide Home  |  Frameset Home

  International Features  |  TOC  |  Multilingual Speech Recognition  

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"
  
  t.response

end
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, "kate");
	
	response.end(TropoJSON(tropo));

}).listen(8000); 
<?php

require 'tropo.class.php';

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

?>
from itty import *
from tropo import Tropo

@post('/index.json')
def index(request):

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

run_itty(server='wsgiref', host='0.0.0.0', port=8888)
{
   "tropo":[
      {
         "say":[
            {
               "value":"Hello, how are you?",
               "voice":"kate"
            }
         ]
      }
   ]
}

The previous example shows how to speak using Kate, our British English voice. We also have Simon, Jorge, Katrin, Paola and quite a few others ready for you. Here's a complete list:


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

Next Step: Multilingual Speech Recognition



  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login
  International Features  |  TOC  |  Multilingual Speech Recognition  

© 2012 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site