资源简介
调用科大讯飞接口,实现语音的录制、语音的合成及语音识别。
代码片段和文件信息
using Microsoft.CognitiveServices.Speech;
using Microsoft.CognitiveServices.Speech.Audio;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Speech.Recognition.File.Input
{
public class Recognition
{
public async void Voice(string inputNameWave SpeechConfig speechConfig)
{
string result = string.Empty;
var stopRecognition = new TaskCompletionSource();
using (var inputVoice = AudioConfig.FromWavFileInput(inputNameWave))
{
using (var speechRecognizer = new SpeechRecognizer(speechConfig inputVoice))
{
speechRecognizer.Recognizing += (s e) =>
{
result = e.Result.Text;
};
speechRecognizer.Recognized += (s e) =>
{
if (e.Result.Reason == ResultReason.RecognizedSpeech)
{
result = e.Result.Text;
}
else if (e.Result.Reason == ResultReason.NoMatch)
{
result = “Error“;
}
};
speechRecognizer.Canceled += (s e) =>
{
result = “Error“ + e.Reason;
if (e.Reason == CancellationReason.Error)
{
result = “ErrorCode“ + e.ErrorCode + e.ErrorDetails;
}
stopRecognition.TrySetResult(0);
};
speechRecognizer.Sessionstarted += (s e) =>
{
};
speechRecognizer.Sessionstopped += (s e) =>
{
result = “Session stopped event“;
stopRecognition.TrySetResult(0);
};
// Starts continuous recognition
await speechRecognizer.StartContinuousRecognitionAsync().ConfigureAwait(false);
// Waits for completion.
// Use Task.WaitAny to keep the task rooted.
Task.WaitAny(new[] { stopRecognition.Task });
// Stops recognition.
await speechRecognizer.StopContinuousRecognitionAsync().ConfigureAwait(false);
}
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 145920 2019-05-17 15:08 WpfApplication3\.vs\WpfApplication3\v14\.suo
文件 130 2019-04-22 15:44 WpfApplication3\packages\Baidu.AI.3.6.11\.nupkg.me
文件 9467 2019-04-16 05:19 WpfApplication3\packages\Baidu.AI.3.6.11\.signature.p7s
文件 112237 2019-05-16 15:22 WpfApplication3\packages\Baidu.AI.3.6.11\Baidu.AI.3.6.11.nupkg
文件 88064 2019-04-16 11:35 WpfApplication3\packages\Baidu.AI.3.6.11\lib\net35\AipSdk.dll
文件 109819 2019-04-16 11:35 WpfApplication3\packages\Baidu.AI.3.6.11\lib\net35\AipSdk.xm
文件 88064 2019-04-16 11:35 WpfApplication3\packages\Baidu.AI.3.6.11\lib\net40\AipSdk.dll
文件 88064 2019-04-16 11:35 WpfApplication3\packages\Baidu.AI.3.6.11\lib\net45\AipSdk.dll
文件 88064 2019-04-16 11:35 WpfApplication3\packages\Baidu.AI.3.6.11\lib\netstandard2.0\AipSdk.dll
文件 18722 2018-11-06 08:19 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\.signature.p7s
文件 961 2018-11-06 15:16 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\Microsoft.CognitiveServices.Speech.props
文件 1614 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx.h
文件 4081 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_audio_config.h
文件 19496 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_audio_stream.h
文件 3213 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_audio_stream_format.h
文件 1549 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_common.h
文件 8407 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_enums.h
文件 825 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_eventargs.h
文件 8247 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_eventsignal.h
文件 4826 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_intent_recognition_eventargs.h
文件 2141 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_intent_recognition_result.h
文件 10424 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_intent_recognizer.h
文件 3398 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_intent_trigger.h
文件 2029 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_keyword_recognition_model.h
文件 3912 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_language_understanding_model.h
文件 3454 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_properties.h
文件 19921 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_recognition_async_recognizer.h
文件 1972 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_recognition_ba
文件 1664 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_recognition_eventargs.h
文件 8773 2018-11-06 15:17 WpfApplication3\packages\Microsoft.CognitiveServices.Speech.1.1.0\build\native\include\cxx_api\speechapi_cxx_recognition_result.h
............此处省略408个文件信息
相关资源
- Unity Windows Speech
- c# 用SAPI实现语音识别及文本转换的详
- 语音识别系统(asp.net+c#)
- 基于讯飞的离线语音识别C#
- c# 语音识别 智能机器人 语音问答
- C#(VS2017)百度语音识别demo
- 语音识别+文字语音合成C#
- 用C#实现文本朗读和语音识别功能
- c#语音识别及朗读系统_基于speechSDK开
- C#版本语音识别
- 科大讯飞语音识别最新流式接口C# d
- c#实现讯飞语音识别
- speechstt c#写的语音识别程序
- Speech 语音识别功能
- c#实现百度语音识别.rar
- C#科大讯飞源文件
- 讯飞语音播放
- 语音识别 -科大讯飞语音库SDK开发接口
- C# 语音识别+ 文字朗读 开发
- C# 语音识别(调用百度语音识别接口
- C#调用科大讯飞语音转写语音合成的接
- 百度语音识别(采集麦克风声音 并自
- C# 翻译demo基于科大讯飞
评论
共有 条评论