【发布时间】:2019-05-30 03:44:54
【问题描述】:
加载时出现以下异常:
speechRecognizer = new Microsoft.CognitiveServices.Speech.SpeechRecognizer(config);
内部异常:InnerException = {"无法加载 DLL 'Microsoft.CognitiveServices.Speech.csharp.bindings.dll': 找不到指定的模块。 (HRESULT 的例外情况: 0x8007007E)"}
Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE.SpeechConfig_FromSubscription(String jarg1,字符串 jarg2) 在 Microsoft.CognitiveServices.Speech.Internal.SpeechConfig.FromSubscription(字符串 订阅,字符串区域)在 Microsoft.CognitiveServices.Speech.SpeechConfig.FromSubscription(字符串 subscriptionKey, String region) |ERROR|类型初始化器 'SWIGExceptionHelper' 引发了异常。 2019-01-03 16:02:50.2178|错误|类型初始化器 'Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE' 抛出异常。
【问题讨论】:
-
1.确保你已经安装了
Microsoft.CognitiveServices.Speech2。如果你正在使用DOTNET Core,当你运行dotnet publish时,Microsoft.CognitiveServices.Speech.csharp.bindings.dll应该被自动复制到publish/runtimes/<your-platform>/native/的目录中。 3. 如果您使用.NET Framework,则bindings.dll位于\bin\x64\Debug或\bin\x64\Release文件夹中。 -
@itminus 非常感谢。现在工作正常。
标签: c# wpf wcf speech-recognition azure-cognitive-services