Hi,
you can find it from the official documentation: https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-speech-synthesis?tabs=browserjs%2Cterminal&pivots=programming-language-python#synthesize-speech-to-a-file , also for other programming languages.
regards
If an answer is helpful, please click on or upvote
which might help other community members reading this thread.