C# IBM沃森日记

C# IBM沃森日记,c#,speech-to-text,watson,C#,Speech To Text,Watson,您好,我正在用c#visual studio 2017开发一个应用程序,我测试了语音到文本的代码及其工作情况,但现在我需要进行说话人日记 我该怎么做 SpeechToTextService _speechToText = new SpeechToTextService(); _speechToText.SetCredential("", ""); //var results = _speechToText.GetModels(); using (FileStream fs = File.Open

您好,我正在用c#visual studio 2017开发一个应用程序,我测试了语音到文本的代码及其工作情况,但现在我需要进行说话人日记

我该怎么做

SpeechToTextService _speechToText = new SpeechToTextService();
_speechToText.SetCredential("", "");
//var results = _speechToText.GetModels();
using (FileStream fs = File.OpenRead("mp3"))
{  
    //  get a transcript of the audio file.
    var results = _speechToText.Recognize("audio/mp3", fs);
}

我想出了解决办法

代码如下所示:

var results = _speechToText.Recognize("audio/mp3", fs,null, "en-US_BroadbandModel", null, true, null, null, null, null, null, null, null,false, true, **true**); 
最后一个
true
标识
扬声器标签
,结果将以这种方式显示