Fatal Exception: java.util.concurrent.TimeoutException: com.microsoft.cognitiveservices.speech.util.SafeHandle.finalize() timed out after 60 seconds
at com.microsoft.cognitiveservices.speech.util.SafeHandle.releasePropertyHandle()
at com.microsoft.cognitiveservices.speech.util.SafeHandle.close(:55)
at com.microsoft.cognitiveservices.speech.util.SafeHandle.finalize()
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:339)
at java.lang.Daemons$FinalizerDaemon.processReference(Daemons.java:324)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:300)
at java.lang.Daemons$Daemon.run(Daemons.java:145)
at java.lang.Thread.run(Thread.java:1012)
And my code:
withContext(Dispatchers.IO) {
SpeechSynthesizer synthesizer = new SpeechSynthesizer(speechConfig, audioConfig);
SpeechSynthesisResult result = result = synthesizer.SpeakSsmlAsync(ssml).get();
result.close();
}