Custom external lexcion does not work when calling TTS speech synthesis service using Java SDK

xin chen 0 Reputation points
2024-07-19T03:11:48.4666667+00:00

We don't want the * sign to sound, so we set up a custom lexicon, but the synthesized speech doesn't seem to be affected by the lexicon.

<speak xmlns="http://www.w3.org/2001/10/synthesis"
       xmlns:mstts="http://www.w3.org/2001/mstts"
       xmlns:emo="http://www.w3.org/2009/10/emotionml"
       version="1.0"
       xml:lang="zh-CN">
    <voice name="zh-CN-XiaoxiaoNeural" style="chat" rate="5%%">
        <lexicon uri="https://guiyaai.blob.core.windows.net/tts-resources/azure_custom_lexicon.xml"/>
         **测试**##BTW和
    </voice>
</speak>
Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,762 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 24,890 Reputation points Microsoft Employee
    2024-07-23T09:32:06.5266667+00:00

    @xin chen I'm glad to see you were able to resolve your issue. Thanks for posting your solution so that others experiencing the same thing can easily reference this. Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer, they can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.

    . . Issue:

    You don't want the * sign to sound, so you have set up a custom lexicon, but the synthesized speech doesn't seem to take effect.

    . . Resolution:

    You have resolved this issue mainly by uploading custom Lexion files in Speech Studio, as Speech Studio has a built-in strict Lexion file verification program. If the file format is incorrect, the upload will fail, and the report information can be downloaded to adjust the Lexion content. After successful upload, it indicates that the Lexion file is correct.

    0 comments No comments

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.