我正在尝试使聊天机器人上的声音听起来更加愉悦。我正在使用Microsoft文档https://docs.microsoft.com/en-gb/azure/cognitive-services/speech-service/ 我不知道为什么在尝试以下标签时这不起作用:
ssmlWrappedmessage = "<speak version=\"1.0\" xmlns=\"https://www.w3.org/2001/10/synthesis\" xmlns:mstts=\"https://www.w3.org/2001/mstts\" xml:lang=\"pt-BR\"><voice name=\"pt-BR-FranciscaNeural\"><mstts:express-as type=\"cheerful\">" + message.Trim() + "</mstts:express-as></voice></speak>";
但是当我只使用它时,我会听到声音:
public string SSMLWrap(string message, string voicestyle)
{
string ssmlWrappedmessage = "";
switch (voicestyle.ToLower())
{
case "robot":
ssmlWrappedmessage = " <prosody pitch=\"+90%\" range=\"-110%\" rate=\"10%\" volume=\"x-loud\" > " + message.Trim() + "</prosody>";
如何使声音听起来更生动有趣?