@Lucas Mikulla I was able to repro this issue at my end and find the cause of this issue.Cause:
The problem with the provided code is that it doesn't wait for the speech synthesis to complete before the synthesizer object is closed. When I tried it, I got this error - java.lang.IllegalStateException: Cannot dispose a synthesizer while async synthesis is running. Await async synthesis to avoid unexpected disposals.
.
Fix:
I replaced test.speak("Hello"); with test.speak("Hello").get(); and Speech SDK did not crash anymore.
.
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.