question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SPXERR_GSTREAMER_NOT_FOUND_ERROR when using mp3 file with Microsoft.CognitiveServices.Speech

See original GitHub issue

I 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.

In the docs here https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-use-codec-compressed-audio-input-streams?tabs=debian&pivots=programming-language-csharp

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:closed
  • Created 3 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jhakulincommented, Jun 22, 2021

Thanks for comments, I reopen the issue as we need to improve the documentation here

1reaction
vortex1024commented, Apr 6, 2021

@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. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

SPXERR_GSTREAMER_NOT_F...
SPXERR_GSTREAMER_NOT_FOUND_ERROR when using mp3 file with Microsoft.CognitiveServices.Speech · c# · speech-recognition · speech-to-text · azure- ...
Read more >
Speech-to-text fails to work with MP3 input in Machine ...
Hi,. I try to use the speech-to-text API from within Azure Machine Learning Studio on an MP3 file. ... However, when I then...
Read more >
SPXERR_GSTREAMER_NOT_F...
[Solved]-SPXERR_GSTREAMER_NOT_FOUND_ERROR when using mp3 file with Microsoft.CognitiveServices.Speech-C# · Do not use the latest version of Gstreamer · Use this ...
Read more >
Speech to text mp3 audio files using Azure Cognitive Services ...
You can for now only submit wav audio format files to transcription. This is definitely a downside as you need to upload a...
Read more >
Azure Speech to Text of MP3 files - Curia Damiano's blog
Currently Speech-to-Text can't work with MP3 files; the suggested solution is to install GStreamer and invoke it as described in the official ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found