Giter Club home page Giter Club logo

azure-tts-lexicon-cn's Introduction

azure-tts-lexicon-cn

ci

适用于 Azure Text to Speech 服务的简体中文词典。

Azure TTS 服务的声音真的非常接近真实的人类了,但是对于中文的一些多音字还是识别的不够准确。幸运的是可以使用自定义词典来弥补这个缺陷。

Azure TTS 服务支持在 SSML 标记中嵌入词典文件链接的方式使用词典。但是这要求词典文件必须可以被互联网访问,考虑到微软服务器的延迟,想来想去还是放在 Github 上比较合适。这样也方便于同大家一起来丰富词典的内容。

使用

词典文件的链接为:

https://raw.githubusercontent.com/wxxxcxx/azure-tts-lexicon-cn/main/lexicon.xml

在 SSML 中使用词典文件:

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
          xmlns:mstts="http://www.w3.org/2001/mstts"
          xml:lang="en-US">
    <voice name="zh-CN-XiaoxiaoNeural">
        <lexicon uri="https://raw.githubusercontent.com/wxxxcxx/azure-tts-lexicon-cn/main/lexicon.xml"/>
        等一会儿,朱重八!
    </voice>
</speak>

更多细节请参考:https://learn.microsoft.com/zh-cn/azure/cognitive-services/speech-service/speech-synthesis-markup#use-custom-lexicon-to-improve-pronunciation。

贡献

如果发现 TTS 有哪个词发音不对的话可以通过 issue 的方式告诉我,我看到了会加上去的。

考虑到作者合并PR和更新可能不是那么及时,有自定义词典需求的用户可以考虑 Fork 一份自己修改。

需要修改的文件为 lexicon.xml。规则应该还算比较好懂,看看现有的例子应该就能明白。

更多细节也可以参考微软官方的文档:https://learn.microsoft.com/zh-cn/azure/cognitive-services/speech-service/speech-synthesis-markup#use-custom-lexicon-to-improve-pronunciation。

需要注意的是使用自己 Fork 的时词典别忘了将链接中的<用户名>为修改为你自己的。

https://raw.githubusercontent.com/<用户名>/azure-tts-lexicon-cn/main/lexicon.xml

另外欢迎提交 PR 哦。

azure-tts-lexicon-cn's People

Contributors

cywx1519 avatar ly661 avatar wxxxcxx avatar xsdcz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.