How to fix 400 error with custom Lexicon file.

Jeff E 0 Reputation points
2024-07-17T22:32:21.4+00:00

Below is our tried and tested implementation using azure speech services with one addition. The lines creating and setting the custom lexicon file are causing issues. Without those lines, the code works as intended and produces a proper response, but with the lines the response gives a 400 error without any other information. The lexicon file is on a block blob and is anonymously accessible. I will include the lexicon file as well. Any help would be much appreciated.

I couldn't attach the code to the original question in code blocks for some reason so here it is in plain text.

<?xml version="1.0" encoding="UTF-8"?>
<lexicon xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon           http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"     version="1.0" xml:lang="en-US" xmlns="http://www.w3.org/2005/01/pronunciation-lexicon" alphabet="ipa">
    <lexeme>         
        <grapheme>Jeff</grapheme>         
        <alias>Jeffrey</alias>     
    </lexeme> 
</lexicon>
Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,777 questions
{count} votes

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.