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
질문됨 2달 전133회 조회
1개 답변
0
수락된 답변

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
답변함 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠