Trouble with JavaScript sample in Text-to-speech quickstart - function doesn't return anything

mkb13 11 Reputation points
2021-12-01T17:59:16.823+00:00

I am writing a Blazor app that uses TTS and am forced to use the JavaScript API unfortunately due to the problem mentioned here: https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues/930.

I am following the examples in the quickstart here: https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=script%2Cwindowsinstall&pivots=programming-language-javascript -- specifically the first snippet under "Get result as an in-memory stream".

function synthesizeSpeech() {  
    const speechConfig = sdk.SpeechConfig.fromSubscription("
Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,064 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Benjamin 10 Reputation points
    2023-02-11T13:06:07.2333333+00:00

    Same issue, more than a year later. I've spent 2 days trying to figure out how to use Microsoft's Cognitive Services in Microsoft's flagship Web technology.

    Seems like that should be a thing that they'd encourage-- I dunno, with an easy way to do it.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.