如何在谷歌文本到语音中使用Phonetic或Phoneme发音? [英] How to use Phonetic or Phoneme pronunciation in google text to speech?

查看:36
本文介绍了如何在谷歌文本到语音中使用Phonetic或Phoneme发音?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用 google 的文本来获得语音或音素发音演讲,但未能始终如一地发挥作用.

I have been trying for a while to get Phonetic or Phoneme pronunciation working with google's text to speech but have not managed to get it performing consistently.

我通过使用 https://tophonetics.com/ 获得了有限的结果它翻译成牛发疯了".到ðə kaʊ wɛnt mæd."但是'the' 'ðə'听不见.当我尝试ðɪs ɪz səm fəˈnɛtɪk tɛkst ˈɪnˌpʊt"时.

I have managed to get limited results from using https://tophonetics.com/ It translated "The cow went mad." to "ðə kaʊ wɛnt mæd." but the 'the' 'ðə' was not audible. And when I tried "ðɪs ɪz səm fəˈnɛtɪk tɛkst ˈɪnˌpʊt".

是否有任何 SSML 代码来定义文本的语音块,可以是这种格式D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt"可以用来代替ðɪs ɪz səm fəˈnɛtɪk tɛkst ˈɪnˌpʊt""

Are there any SSML codes to define phonetic blocks of text, that can be this format "D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt" can be used instead of "ðɪs ɪz səm fəˈnɛtɪk tɛkst ˈɪnˌpʊt" "

推荐答案

SSML 标签 可以满足您的需求.

There is the SSML tag <phoneme> that serves your purpose.

很遗憾,目前 Google Cloud Text-to-speech 不支持它.文档中列出了 Google Cloud 的可用 SSML 标记子集. 标签不在此列表中.使用 Google Cloud 的 text-to-speech-demo 进行的实验证实音素被忽略.正如@Trevor 在评论中已经指出的那样,标签的内容被当作普通文本读取.

Unfortunately, it's currently not supported in Google Cloud Text-to-speech. The available subset of SSML tags for Google Cloud is listed in the documentation. The <phoneme> tag is not in this list. An experiment using Google Cloud's text-to-speech-demo confirms that the phonemes are ignored. The content of the tag is being read as ordinary text, as has already been remarked by @Trevor in the comments.

标签受 Microsoft Azure Text-to-Speech 和 Amazon Polly 的支持.在这两种情况下,可用的音素仅限于所用语言中可用的音素(请参阅 此处为 Azure这里是 Polly).Azure 文档并不是 100% 明确排除语言外音素,而是使用 Azure Text-to-Speech 演示 确认它们没有正常工作.在某些情况下,它们至少似乎被所用语言中最接近的可用等效项所取代.

The <phoneme> tag is, however, being supported by Microsoft Azure Text-to-Speech and Amazon Polly. In both cases, the available phonemes are limited to those available in the language being used (see here for Azure and here for Polly). The Azure documentation isn't 100% clear about the exclusion of out-of-language phonemes, but practical experiments with the Azure Text-to-Speech demo confirm that they're not working properly. In some cases, they at least seem to be replaced by the nearest available equivalent in the language used.

仅限于一种语言的音素严重限制了音素标签的用途.例如,您不能使用该功能在第二语言中嵌入正确发音的内容,因为第二语言通常会有一些第一语言中没有的音素.每种语言都有一些在另一种语言中没有的音素的具体语言对是英语/德语、西班牙语/德语、英语/西班牙语.

Being restricted to the phonemes of one language severely limits the usefulness of the phonemes tag. E.g., you can't used the feature to embed correctly pronounced content in a second language, as the second language will usually have some phonemes that are not available in the first language. Concrete language pairs in which each language has some phonemes that are not available in the other one are English/German, Spanish/German, English/Spanish.

这篇关于如何在谷歌文本到语音中使用Phonetic或Phoneme发音?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆