Microsoft.Cognitiveservices.Speech returns DllNotFoundException when on iOS16 device and dotnet MAUI

TAS Sakata 6 Reputation points
2022-11-30T23:55:55.197+00:00

Hello,

My app has Keyword recognition function using Microsoft.Cognitiveservices.Speech.
It works fine with Android.
But if deployed onto iOS device, DLLNOTFOUNDEXCEPTION occurs.
iOS device is iPhone X running latest version of the iOS16.

Error msg when debugging

System.DllNotFoundException: libMicrosoft.CognitiveServices.Speech.core.so
at Microsoft.CognitiveServices.Speech.Audio.AudioConfig.FromDefaultMicrophoneInput()

To reproduce
Steps to reproduce the behavior:

  1. Open the attached project in Visual Studio 2022 64bit Version 17.5.0 Preview 1.0
  2. Run the project on iOS device
  3. Click on "Click me" button
  4. Allow Microphone access
  5. Re-run the project
  6. Click on "Click me" button
  7. Say "Hey Computer" using active microphone

Expected behavior
Debug.Writeline says "Keyword successfully recognized" instead of the exception above.

Version of the Microsoft.Cognitiveservices.Speech

  1. 24.2 (current)

Platform, Operating System, and Programming Language

  • Windows 10 x64
  • C#
  • iPhone X

If more information needed to reproduce, could you let me know?

Best regards,

PS the project file is attached on comment below.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,700 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,957 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.