Pergunta

I am trying to make this line work:

tropo.say("Some text","kate");

Documentation

But this line breaks the node.js app I am writing. If I don't specify the voice then it works fine. For example:

tropo.say("Some text");

Any tropo guru here that can help me out?

Foi útil?

Solução

You linked to Scripting docs, but your app is WebAPI. Here is a script from those docs:

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);

https://www.tropo.com/docs/webapi/international_speaking_other_languages.htm

I believe this was resolved in IRC already, but posting the above for any other users checking it out.

Justin Dupree
Director of Customer Experience
Voxeo Labs

Outras dicas

You are passing your parameter wrong. You have posted a link to the documentation, which clearly says it should be:

say("Some text",{voice:"kate"});

The voice Kate is only for British English language. What language are you specifying in your application, if any. The default is U.S English and the female voices you have available are Allison (Default), Susan, Vanessa, Veronica. Logs should give you a clue as to what is going on. And if you are still stuck ask your question in the Tropo Forum. Voxeo's Extreme Support is pretty good about providing timely and useful assistance.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top