I am running the Java Speech Recognition Samples from https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/samples/java/jre/console
It is working fine on Win 10, however I am getting java.lang.UnsatisfiedLinkError: com.microsoft.cognitiveservices.speech.SpeechConfig.setTempDirectory exception when running on CentOS 7. I have ensured required per-requisite are installed on CentOS 7.
I referred following links for similar issue, however it's not working for me
https://learn.microsoft.com/en-us/answers/questions/660957/text-speech-when-speechconfig-init-got-error.html
https://bytemeta.vip/repo/Azure-Samples/cognitive-services-speech-sdk/issues/1461
Appreciate any pointers/suggestion.
Here is how I am running the sample and getting the exception.
# mvn compile exec:java -Dexec.mainClass="com.microsoft.cognitiveservices.speech.samples.console.Main"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SpeechSDKDemo 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ SpeechSDKDemo ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/siprec/cognitive-services-speech-sdk/samples/java/jre/console/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ SpeechSDKDemo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ SpeechSDKDemo ---
1. Speech recognition with microphone input.
2. Speech recognition with microphone input and detailed recognition results
3. Speech recognition in the specified language.
4. Speech recognition using customized model.
5. Speech continuous recognition using events with file.
6. Speech recognition with audio stream.
7. Speech recognition with keyword spotting.
8. Translation with microphone input.
9. Translation with file input.
10. Translation with audio stream.
11. Intent recognition with microphone.
12. Intent recognition with language.
13. Intent continuous recognition using events with file.
14. Intent Pattern Matching with microphone.
15. Intent Pattern Matching with microphone and keyword spotting.
16. Speech continuous recognition using events with a PushStream.
17. Speech continuous recognition using events with file and Phrase List.
18. Speech synthesis to speaker output.
19. Speech synthesis with specified language.
20. Speech synthesis with specified voice.
21. Speech synthesis to wave file.
22. Speech synthesis to mp3 file.
23. Speech synthesis to pull audio output stream.
24. Speech synthesis to push audio output stream.
25. Speech synthesis to result.
26. Speech synthesis to audio data stream.
27. Speech synthesis events.
28. Speech synthesis word boundary event.
29. Speech synthesis server scenario example.
30. Speech synthesis with source language auto detection.
31. Speaker verification with microphone.
32. Speaker verification with file.
33. Speaker identification with microphone.
34. Speaker identification with file.
35. Speech recognition from default microphone with Microsoft Audio Stack enabled.
36. Speech recognition from a microphone with Microsoft Audio Stack enabled and pre-defined microphone array geometry specified.
37. Speech recognition from multi-channel file with Microsoft Audio Stack enabled and custom microphone array geometry specified.
38. Speech recognition from pull stream with custom set of enhancements from Microsoft Audio Stack enabled.
39. Speech recognition from push stream with Microsoft Audio Stack enabled and beamforming angles specified.
40. Pronunciation assessment with microphone input.
41. Pronunciation assessment with stream input.
42. Speech synthesis to audio and SRT files.
43. Recognize once from file, with at-start language detection.
44. Continuous speech recognition from file, with at-start language detection.
45. Continuous speech recognition from file, with at-start language detection with custom model.
46. Continuous speech recognition from file, with continuous language detection with custom models.
Your choice (0: Stop): 16
[WARNING]
java.lang.UnsatisfiedLinkError: com.microsoft.cognitiveservices.speech.SpeechConfig.setTempDirectory(Ljava/lang/String;)V
at com.microsoft.cognitiveservices.speech.SpeechConfig.setTempDirectory(Native Method)
at com.microsoft.cognitiveservices.speech.SpeechConfig.