How to increase audio quality of TTS? (Node.js)

Raul 25 Reputation points
2023-03-07T19:03:45.4566667+00:00

Hiya,

I'm playing around with the Text-to-Speech service, using Node.js with code from the quickstart guide, but I can't seem to increase the bitrate of the generated audio? The audio I'm getting doesn't sound nearly as good as that from the demo page, and I'm using the same SSML code it provides.

The speechConfig class says to modify the SpeechSynthesisOutputFormat attribute, but setting it to many different values in the list of available audio formats (tried different RIFFs, RAWs, WebMs, Audios) yields no change at all in the audio quality (same bitrate, filesize).

Would love to hear from someone that's worked with the SDK in Node.js and could confirm or refute that speechConfig.SpeechSynthesisOutputFormat = "Audio24Khz160KBitRateMonoMp3" is the right approach for increasing audio quality.

Thanks

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,619 questions
{count} votes

Accepted answer
  1. romungi-MSFT 48,911 Reputation points Microsoft Employee Moderator
    2023-03-08T09:10:15.3+00:00

    Raul That is the correct setting to use for changing the format. Could you try something like below instead:

    speechConfig.speechSynthesisOutputFormat = sdk.SpeechSynthesisOutputFormat.Audio24Khz160KBitRateMonoMp3;

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.