Hello @Kaushik Raju
I hope you have solved the issue. Since we did not receive your response and we were not able to reproduce the issue, we want to do a double check to see if you still need help. Please let us know if you are still blocked by this issue.
For your reference, this is the document for quick start:
https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=script%2Cbrowserjs%2Cwindowsinstall&pivots=programming-language-javascript
JS code sample: https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/samples/js/browser
I hope this helps, please let us know if you have further concern, we are glad to help.
Regards,
Yutong