1

I'm using the Tropo MVC classes and have a problem with changing the voice in the say. Setting the voice property of the say object does not seem to change the voice for example:

                Say say1 = new Say("This is first voice");
                say1.Voice = "susan";
                Say say2 = new Say("This is the male voice");
                say2.Voice = "dave";
                List<Say> sayList = new List<Say>();
                sayList.Add(say1);
                sayList.Add(say2);
                Script.Ask(null, null, new Choices("[1 DIGIT]", "dtmf", "#"), null, strArgs, true, sayList, Convert.ToSingle(action.Timeout));

The voice does not change. In fact it appears that the only way to change the voice is to set Script.Voice = "voice" which doesn't work for me as I have to handle language select in the first Ask which requires English voice followed by French voice.

4

1 回答 1

2

Tropo 还支持SSML,这是一种超级强大的标记语言,用于混合语音和调整语音节奏/节奏。

您可以通过执行以下操作在单个 Say 命令中混合声音:

new Say("<?xml version='1.0'?><speak>For English please press 1.<voice name='Carlos' xml:lang='es'>para el español por favor pulse 2</voice></speak>")

内联 XML 有点 yukkie,但它可以完成工作,学习 SSML 将允许您创建一些听起来非常专业的应用程序。

于 2012-10-03T16:13:24.797 回答