1

I'm using Google's example for phoneme implementation as follows:

<phoneme alphabet="ipa" ph="t&#x259;mei&#x325;&#x27E;ou&#x325;"> tomato </phoneme>

I'm using Postman to send as POST requests to the https://texttospeech.googleapis.com/v1/text endpoint.

I notice that if I alter the word "tomato" but keep the original value for "ph", the word "tomato" is still completely returned for the voice audio. I would have expected the voice audio to return "To" sound only.

<phoneme alphabet="ipa" ph="t&#x259;"> tomato </phoneme>

When sending POST request in JSON format via Postman, I always escape the quotation marks to avoid JSON parsing errors:

{
  "audioConfig":{
    "audioEncoding":"LINEAR16",
    "volumeGainDb":"16",
    "pitch": 0,
    "speakingRate": 1
  },
  "input":{
    "ssml":"<speak><phoneme alphabet=\"ipa\" ph=\"t&#x259;\"> tomato </phoneme></speak>" 
  },
  "voice":{
    "languageCode":"en-US",
    "name":"en-US-Wavenet-F",
    "ssmlGender":"FEMALE"
  }

}

Anyone know why Phonemes don't appear to be working?

Thanks in advance.

Trevor
  • 139
  • 1
  • 10

2 Answers2

0

Google Cloud Speech-to-Text only supports a subset of the Speech Synthesis Markup Language (SSML) tags and unfortunately <phoneme> is not one of those at the moment.

You can find which ones are supported here.

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
Daniel Duato
  • 378
  • 2
  • 7
0

Phonemes were not supported when the question was asked in 2020, but they are now in 2021. See this answer for some gotchas to look for.

Lena Schimmel
  • 7,203
  • 5
  • 43
  • 58