未找到 Microsoft 认知服务语音核心
Microsoft Cognitive Services Speech core not found
当我尝试配置 specch 引擎时,它从 SpeechConfig.FromSubscription method.How 抛出异常“libMicrosoft.CognitiveServices.Speech.core.so assembly: type: member:(null)” 我可以解决这个问题吗问题?可能出了什么问题?
private async void btnStart_Clicked(object sender, EventArgs e)
{
bool isMicEnabled = await micService.GetPermissionAsync();
if (!isMicEnabled)
{
return;
}
if (recognizer == null)
{
var config = SpeechConfig.FromSubscription(GlobalData.CognitiveServicesApiKey, GlobalData.CognitiveServicesRegion);
recognizer = new SpeechRecognizer(config);
recognizer.Recognized += (obj, args) =>
{
ReceiveTranscription(args.Result.Text);
};
}
if (isTranscribing)
{
try
{
await recognizer.StopContinuousRecognitionAsync();
}
catch (Exception)
{
}
isTranscribing = false;
}
else
{
try
{
await recognizer.StartContinuousRecognitionAsync();
}
catch (Exception)
{
}
isTranscribing = true;
}
UpdateDisplayState();
}
显然 speech.core 二进制文件不可用。根据此演练,可能是 nuget 包未正确安装:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstarts/setup-platform?tabs=xaml%2Clinux%2Cjre%2Cbrowser&pivots=programming-language-csharp
当我尝试配置 specch 引擎时,它从 SpeechConfig.FromSubscription method.How 抛出异常“libMicrosoft.CognitiveServices.Speech.core.so assembly: type: member:(null)” 我可以解决这个问题吗问题?可能出了什么问题?
private async void btnStart_Clicked(object sender, EventArgs e)
{
bool isMicEnabled = await micService.GetPermissionAsync();
if (!isMicEnabled)
{
return;
}
if (recognizer == null)
{
var config = SpeechConfig.FromSubscription(GlobalData.CognitiveServicesApiKey, GlobalData.CognitiveServicesRegion);
recognizer = new SpeechRecognizer(config);
recognizer.Recognized += (obj, args) =>
{
ReceiveTranscription(args.Result.Text);
};
}
if (isTranscribing)
{
try
{
await recognizer.StopContinuousRecognitionAsync();
}
catch (Exception)
{
}
isTranscribing = false;
}
else
{
try
{
await recognizer.StartContinuousRecognitionAsync();
}
catch (Exception)
{
}
isTranscribing = true;
}
UpdateDisplayState();
}
显然 speech.core 二进制文件不可用。根据此演练,可能是 nuget 包未正确安装:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstarts/setup-platform?tabs=xaml%2Clinux%2Cjre%2Cbrowser&pivots=programming-language-csharp