Why does TTS cognitive service sometimes return error 400 when using custom lexicon?

Naphat 25 Reputation points
2024-09-14T15:34:57.43+00:00

When calling https://southeastasia.tts.speech.microsoft.com/cognitiveservices/v1? It returns the error "400 Synthesis failed. StatusCode: FailedPrecondition, Details: SSML parsing error: 0x8004801c - Wanted data exists in data file". However, the service sometimes works fine without any changes.

Lexicon File:

<lexicon xmlns="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd" alphabet="ipa" xml:lang="en-US"> <lexeme> <grapheme>THB</grapheme> <alias>Baht</alias> </lexeme> </lexicon>

Request Body:

<speak version="1.0" xml:lang="en-US" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="http://www.w3.org/2001/mstts"> <voice xml:lang="en-US" xml:gender="Female" name="en-US-AriaNeural"> <lexicon uri="https://pathtofile/en-US.xml" /> <mstts:silence type="Sentenceboundary" value="0ms" /> <mstts:silence type="Leading-exact" value="0ms" /> <mstts:silence type="Tailing-exact" value="0ms" /> <lang xml:lang="en-US">members enjoy a variety</lang> </voice> </speak>
Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,774 questions
{count} vote

Accepted answer
  1. navba-MSFT 24,985 Reputation points Microsoft Employee
    2024-09-19T08:46:43.83+00:00

    @Naphat @DanG @Peter Stafiychuk Apologies for the late reply.

    Please accept our sincere apologies for the inconvenience caused due to this issue.

    .

    Root Cause: There is a code bug which corrupt our engine when user sending refresh lexicon signal. All request with lexicon tag after it will failed to load lexicon files.

    .

    Fix update:

    We have fixed the issue on SouthEastAsia, East US, East US 2 and West Europe. The fix is not yet deployed to all regions.

    .

    Could you please test this again in any of the above regions and let me know if you are still encountering this issue ?

    1 person found this answer helpful.

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.