SPXERR_GSTREAMER_NOT_FOUND_ERROR when using mp3 file with Microsoft.CognitiveServices.Speech
See original GitHub issueI have this piece of code throwing the error in the title:
using (var audioInput = AudioConfig.FromStreamInput(new PullAudioInputStream(new BinaryAudioStreamReader(new BinaryReader(File.OpenRead(audioFile))), AudioStreamFormat.GetCompressedFormat(AudioStreamContainerFormat.MP3))))
using (var recognizer = new SpeechRecognizer(config, sourceLanguageConfig, audioInput))
audioFile is the path to mp3 file with audio to transcribe.
I have installed the latest GStreamer gstreamer-1.0-msvc-x86_64-1.17.2.msi for Windows and added it to the User’s PATH and set GSTREAMER_ROOT_X86. That did not work.
Handling compressed audio is implemented using GStreamer. For licensing reasons GStreamer binaries are not compiled and linked with the Speech SDK. Developers need to install several dependencies and plugins, see Installing on Windows. Gstreamer binaries need to be in the system path, so that the speech SDK can load gstreamer binaries during runtime. If speech SDK is able to find libgstreamer-1.0-0.dll during runtime it means the gstreamer binaries are in the system path.
It says it will look for libgstreamer-1.0-0.dll which is no longer included in the latest version (1.17.2) so I went back to gstreamer-1.0-x86-1.14.1 which does have the required dll, but still getting the same error.
From Visual Studio 2019 console I can invoke exe files included in that folder so I know the PATH is set correctly.
What am I missing?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (2 by maintainers)
Top GitHub Comments
Thanks for comments, I reopen the issue as we need to improve the documentation here
@kedzior-io, thanks, this way it works perfectly! @amitkumarshukla, this really should be documented somewhere. Playing with gstreamer and speech sdk versions is not ffun. 😃