How to improve audio sound quality for Cognitive Services - Text to Speech

Peter Murphy 1 Reputation point
2020-05-26T01:17:08.023+00:00

Hi there,

I'm learning the Text to Speech service and am trying to improve the sound quality.

My code is here ...
https://gist.github.com/risingBirdSong/6568ba42f13b4eeda6deb1f09e8b38f7

the stock quality using

"X-Microsoft-OutputFormat": "riff-8khz-8bit-mono-alaw",

is poor sound quality...

however when i switch to another option (listed here)

https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-text-to-speech

my audio file (mp3) won't play on and i get an error that the file is corrupt.

Do you have any suggestions for improving the sound quality? thank you :)

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

2 answers

Sort by: Most helpful
  1. GiftA-MSFT 11,151 Reputation points
    2020-06-02T19:48:27.433+00:00

    Please refer to this sample for converting text to speech using Node.js. Thanks.

    0 comments No comments

  2. cloud starter 1 Reputation point
    2022-05-28T17:20:50.02+00:00

    In the case of Python, by using the RIFF format (stated in there), you can get better quality file.

    0 comments No comments