I'm working with Xamarin Forms UWP (C#), and I'm using the Microsoft Cognitive Services Speech library.
One of the method,
KeywordRecognitionModel.FromFile(string fileName), requires a string path to a file. I keep getting an error that the file is failed to open, which is probably because of some file permission issues.
That's the error:
An exception of type 'System.ApplicationException' occurred in System.Private.CoreLib.dll Exception with an error code: 0x8 (SPXERR_FILE_OPEN_FAILED)
Unfortunately, there's no other way to pass the file (aka as a stream or StorageFil etc), so I have to use some sort of path.
I already tried placing the file in different locations in the solution itself (the common project, the UWP project etc), as well in the directories that I know the UWP can access with given permission (Documents, Music folder etc).
There are very few samples that use this method, but non of them use a path to the file. I found 2 examples, one in Java which uses a stream (not applicable to c#), and the other c# project, doens't seem to set up an actual path (as if the project is a theoretical example rather than a working one).
At this point I'm out of ideas, maybe one of you guys come up with something I have't thought about.