Azure AI 服务之语音识别
发布时间:2020-12-15 08:16:49 所属栏目:安全 来源:网络整理
导读:SUBSCRIPTIONKEY = ; = = ShortPhrase 和 LongDictation 两种识别模式。 .dataClient = , SUBSCRIPTIONKEY); SendAudioHelper( (FileStream fileStream = bytesRead = [] buffer = [ /spanspan style="color: #0000ff"gt;try/spanspan style="color: #000000
SUBSCRIPTIONKEY = ;
= =
ShortPhrase 和 LongDictation 两种识别模式。
.dataClient =
,
SUBSCRIPTIONKEY);
SendAudioHelper( (FileStream fileStream =
bytesRead =
[] buffer = [
</span><span style="color: #0000ff">try</span><span style="color: #000000">
{
</span><span style="color: #0000ff">do</span><span style="color: #000000">
{
</span><span style="color: #008000">//</span><span style="color: #008000"> 把文件数据读取到 buffer 中。</span>
bytesRead = fileStream.Read(buffer,<span style="color: #800080">0</span><span style="color: #000000">,buffer.Length);
</span><span style="color: #008000">//</span><span style="color: #008000"> 通过 DataRecognitionClient 类型的实例把语音数据发送到服务端。</span>
<span style="color: #0000ff">this</span><span style="color: #000000">.dataClient.SendAudio(buffer,bytesRead);
}
</span><span style="color: #0000ff">while</span> (bytesRead > <span style="color: #800080">0</span><span style="color: #000000">);
}
</span><span style="color: #0000ff">finally</span><span style="color: #000000">
{
</span><span style="color: #008000">//</span><span style="color: #008000"> 告诉服务端语音数据已经传送完了。</span>
<span style="color: #0000ff">this</span><span style="color: #000000">.dataClient.EndAudio();
}
}
}
--- Partial result received by OnPartialResponseReceivedHandler() ---
why
--- Partial result received by OnPartialResponseReceivedHandler() --- --- Partial result received by OnPartialResponseReceivedHandler() --- --- Partial result received by OnPartialResponseReceivedHandler() ---
(e.PhraseResponse.Results.Length == .WriteLine(.WriteLine( ( i = ; i < e.PhraseResponse.Results.Length; i++
--- OnDataShortPhraseResponseReceivedHandler ---
********* Final n-BEST Results *********
[0] Confidence=High,Text="What's the weather like?"
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |