Microsoft.CognitiveServices.Speech is not working after publishing application

0

Getting following exception when loading :

speechRecognizer = new Microsoft.CognitiveServices.Speech.SpeechRecognizer(config);

Inner exception : InnerException = {"Unable to load DLL 'Microsoft.CognitiveServices.Speech.csharp.bindings.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}

Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE.SpeechConfig_FromSubscription(String jarg1, String jarg2) at Microsoft.CognitiveServices.Speech.Internal.SpeechConfig.FromSubscription(String subscription, String region) at Microsoft.CognitiveServices.Speech.SpeechConfig.FromSubscription(String subscriptionKey, String region) |ERROR|The type initializer for 'SWIGExceptionHelper' threw an exception. 2019-01-03 16:02:50.2178|ERROR|The type initializer for 'Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE' threw an exception.

c#
wpf
wcf
speech-recognition
azure-cognitive-services
asked on Stack Overflow Jan 3, 2019 by Ashish Singh • edited Jan 3, 2019 by Juan Leni

1 Answer

0

As the exception says, you are missing "Microsoft.CognitiveServices.Speech.csharp.bindings.dll" . You have to include the dll in the project and mark it as part of the deploy. Make sure it appears in the deployed folder in the IIS , copy it manually as last option.

answered on Stack Overflow Jan 3, 2019 by Albondi

User contributions licensed under CC BY-SA 3.0