Page 1 of 1

TTS: words spelled the same but pronounced differently

PostPosted: Tue Dec 04, 2018 1:35 pm
by al017
Is there a way to make TTS to pick the correct pronunciation with words like "project" (which is a noun if the stress is on the first syllable, and a verb if the stress is on the second syllable, with very different meanings)?

Another example is 还 in Chinese, which could be hai1 or huan1?

For English, so far I found no solution. For Chinese, I found that I can force the right pronanciation by replacing characters with zhuyin and using the alternative TTS text feature. This, however, works only for Apple's voices (e.g., for Chinese (China) - Tin-Ting), but not for built-in TTS (e.g., not for Chinese (Female)). The problem with using Apple's voices is that the app does not recognise the text as Chinese, than, and does not offer a "Launch Pleco" link.

(As clear from the above, I am using the app on IOS devices).

Re: TTS: words spelled the same but pronounced differently

PostPosted: Wed Dec 05, 2018 8:53 am
by Ernie
I don't have a "proper" way to specify a pronunciation. What I would do is the alternate TTS function and enter a different English spelling. In your case, you could try:

praject
pro-ject


For Chinese, iSpeech doesn't support pinyin or bopomofo. So I really don't have a solution unless you pick another character (troublesome), or switch to Siri voice.

I will update the app for the next update so that Launch Pleco will work when a Siri voice is selected.

(It was good timing for me hearing that Siri/Android TTS can speak bopomofo, and with tone marks. I didn't know that. I'll likely want to use this functionality for another project.)

Re: TTS: words spelled the same but pronounced differently

PostPosted: Wed Sep 25, 2019 11:46 pm
by al017
I wonder if there was any progress around this issue, particularly as new TTS services have been added.

Re: TTS: words spelled the same but pronounced differently

PostPosted: Fri Sep 27, 2019 1:17 am
by Ernie
The next version of Flashcards Deluxe (soon after Oct 1, 2019) will support custom pronunciation tags for Amazon Polly TTS.
The format is not particularly friendly, and you'll need to figure out how to code either IPA or X-SAMPA in order to use this feature.
I won't be advertising this right away, but likely will eventually.
Below are examples, and notes at the bottom.


International Phonetic Alphabet (IPA)

You say, <phoneme alphabet="ipa" ph="pɪˈkɑːn">pecan</phoneme>.
I say, <phoneme alphabet="ipa" ph="ˈpi.kæn">pecan</phoneme>.

Extended Speech Assessment Methods Phonetic Alphabet (X-SAMPA)

You say, <phoneme alphabet='x-sampa' ph='pI"kA:n'>pecan</phoneme>.
I say, <phoneme alphabet='x-sampa' ph='"pi.k{n'>pecan</phoneme>.


Mandarin Chinese example using Pinyin

你说 <phoneme alphabet="x-amazon-pinyin" ph="bo2">薄</phoneme>。
我说 <phoneme alphabet="x-amazon-pinyin" ph="bao2">薄</phoneme>。


Notes:

• IPA uses double-quotes around strings, since single-quotes have special IPA meaning (stress).
• X-SAMPA uses single-quotes around strings, since double-quotes have special X-SAMPA meaning.
• You won't likely be able to use our website to transfer X-SAMPA text, due to it using double-quotes for stress marks. (Website upload will treaty double-quotes in a special way.) Instead, you'll need to use Dropbox, Google Drive, or OneDrive.

• If your flashcard text contains any of the following three characters, you will need to change them (as they have special meaning in markup language)
& to &amp;
< to &lt;
> to &gt;

• If your flashcard text contains straight double-quotes or apostrophe, you may need to change them as follows, though I think you likely won't need to.
" to (remove if causing problem)
' to &apos;

Re: TTS: words spelled the same but pronounced differently

PostPosted: Sat Sep 28, 2019 5:45 pm
by al017
Thank you very much, looking forward to this implemented. Will post some feedback after trying.