AWS Polly Pinyin doesn't say certain things. Is there a document with valid Pinyin?

0

Take for example 貪小便宜. If I put this text into the console, it correctly speaks it. tan xiao bian yi. However if I input SSML as follows: <speak><prosody rate='slow'><phoneme alphabet="x-amazon-pinyin" ph="tan1 xiao3 pian2 yi2">貪小便宜</phoneme></prosody></speak>, the voice only says tan pian yi, it skips the xiao. I know certain Pinyin can be romanized in different ways, but xiao seems to be pretty standard from what i've seen. I've also tried xiao1-4 none of which worked.

Is there a way to get a list of the valid pinyin for Polly so I can normalize my pinyin to use what is accepted by Polly? I know the voice can say what I'm looking for, as it works when I put the chinese characters in, however for my usecase they won't always be as readily available as the Pinyin, but the Pinyin seems to be less consistent.

pejrich
preguntada hace un mes126 visualizaciones
1 Respuesta
0
Respuesta aceptada

Nevermind. As is always the case, I spent a long time looking for answers before posting, and minutes after posting I find a solution.

The phoneme tag needs to be split up. So it needs to be sent to Polly as:

<speak>
<prosody rate='slow'>
<phoneme alphabet="x-amazon-pinyin" ph="tan1"></phoneme>
<phoneme alphabet="x-amazon-pinyin" ph="xiao3"></phoneme>
<phoneme alphabet="x-amazon-pinyin" ph="pian2"></phoneme>
<phoneme alphabet="x-amazon-pinyin" ph="yi2"></phoneme>
</prosody>
</speak>

This behavior is different from the standard IPA which does seem to accept arbitrary lengths of IPA under a single phoneme tag.

pejrich
respondido hace un mes

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas