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.

Using the SDK creates java.lang.ClassNotFoundException: com.microsoft.cognitiveservices.speech.RecognitionResult

See original GitHub issue

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

java -d64 -cp ./target/SpeechSDKDemo-0.0.1-SNAPSHOT.jar:./target/dependency/client-sdk-1.0.0.jar com.microsoft.cognitiveservices.speech.samples.console.Main

Choose option 5: “Speech recognition with audio stream”

Any log messages given by the failure

Exception in thread "main" java.lang.NoClassDefFoundError: com/microsoft/cognitiveservices/speech/RecognitionResult                         
        at com.microsoft.cognitiveservices.speech.samples.console.Main.main(Main.java:47)                                                   
Caused by: java.lang.ClassNotFoundException: com.microsoft.cognitiveservices.speech.RecognitionResult                                       
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)                                                                       
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 1 more  

Expected/desired behavior

I get the transcription of my audio file

OS and Version?

Linux:

Linux mypc 4.18.6-arch1-1-ARCH #1 SMP PREEMPT Wed Sep 5 11:54:09 UTC 2018 x86_64 GNU/Linux

Versions

$ java -version                                                                                             
openjdk version "1.8.0_181"                                                                                                                 
OpenJDK Runtime Environment (build 1.8.0_181-b13)                                                                                           
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

I’m using the current latest version from this repo 703d4b0111f4b61f09d776295bd1c5aff7674df5.

Mention any other details that might be useful

I’ve seen issue #46 but I don’t think that applies here because I’m running a 64 bit JVM.

I’m tried this in an Ubuntu Docker container (following the installation steps from the README) and also in an Ubutu 16.04 VM (using the same installation steps).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
mahilleb-msftcommented, Sep 25, 2018

@ahjones - can you double-check you’ve got the packages that are listed here installed?

0reactions
wolfma61commented, Oct 12, 2018

closing this, since there was no update in the last three weeks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception in SpeechConfig setTempDirectory
I am running the Java Speech Recognition Samples from https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/samples/ ...
Read more >
SpeechRecognitionResult Class
Contains properties of the results. (Inherited from RecognitionResult). Reason. Specifies status of speech recognition result. (Inherited from RecognitionResult).
Read more >
AutoDetectSourceLanguageResult Class
Represents the result of auto detecting source languages Added in version 1.8.0.
Read more >
Text Speech when SpeechConfig init got error
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.microsoft.cognitiveservices.speech.SpeechConfig.
Read more >
java.lang.UnsatisfiedLinkError trying to run Azure text ...
I'm trying to get started with the Azure text to speech quickstart here: https://learn.microsoft.com/en-us/azure/cognitive-services/speech ...
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