简体   繁体   中英

Google Cloud Text To Speech API force pronunciation as word

I'm working on a little TTS project and got everything working so far. The only thing I'm struggling with is forcing TTS to say letters as a word.

We mention a tool called "bip", it's meant to be pronounced as a word, not letters. This works in wav.net but not in the standard voices that are the only option for en-GB. It's always using BIP

Anybody got an idea how to force this? Thanks in advance.

jay

To force a word to be spoken as letters (characters), use the SSML say-as element, <say-as interpret-as="characters"></say> element like so:

<speak>
  <say-as interpret-as="characters">bip</say-as>
</speak>

In addition, as of March 2021 , the <phoneme/> element is supported so you could use IPA/X-SAMPA to describe the output desired.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM