MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.29k stars 21.47k forks source link

Java Speech SDK example does not compile #104251

Closed kgbvax closed 1 year ago

kgbvax commented 1 year ago

When following instructions, compile results in compile errors.

./target/dependency holds client-sdk-1.24.2.jar

javac SpeechRecognition.java -cp ".;target\dependency*" java -cp ".;target\dependency*" SpeechRecognition SpeechRecognition.java:2: Fehler: Package com.microsoft.cognitiveservices.speech.audio ist nicht vorhanden import com.microsoft.cognitiveservices.speech.audio.AudioConfig; ^ SpeechRecognition.java:18: Fehler: Symbol not found public static void recognizeFromMicrophone(SpeechConfig speechConfig) throws InterruptedException, ExecutionException {

Even when specificying client library directly, this fails with the same error javac SpeechRecognition.java -cp .;target/dependency/client-sdk-1.24.2.jar java -cp ".;target\dependency*" SpeechRecognition SpeechRecognition.java:2: Fehler: Package com.microsoft.cognitiveservices.speech.audio ist nicht vorhanden import com.microsoft.cognitiveservices.speech.audio.AudioConfig; ^ SpeechRecognition.java:18: Fehler: Symbol not found


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

RamanathanChinnappan-MSFT commented 1 year ago

@kgbvax

Thanks for your feedback! We will investigate and update as appropriate.

Naveenommi-MSFT commented 1 year ago

@kgbvax I've delegated this to content author @eric-urban, who will review it and offer their insightful opinions.

eric-urban commented 1 year ago

@kgbvax - Please confirm did you already run mvn clean dependency:copy-dependencies? You might want to also try the latest SDK version 1.25. Can you share more details about your environment and repro steps? I am running this successfully on Windows 11 using VS Code.

eric-urban commented 1 year ago

please-close