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 Cognitive Services
Azure Cognitive Services
A group of Azure artificial intelligence services and cognitive APIs that help build intelligent apps.
948 questions
{count} votes

2 answers

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

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

    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.

    No comments