I’m trying to get the Google TTS API to pronounce foreign words properly, but can’t figure it out. Aside from their demo:
<speak>The french word for cat is <lang xml:lang="fr-FR">chat</lang></speak>
Almost anything else I try is ignored, for example (cloud API demo URL if you have an account):
<speak>I visited <lang xml:lang="lt-LT">Rūdiškės</lang>, which should be pronounced as <voice language="lt-LT" gender="male">Rūdiškės</voice></speak>
If you can’t visit that, the first pronunciation is like “Ru-di-skis”, and the 2nd one “Ru-dish-kes”. And FWIW, the issue with the above “working” SSML is that it changes the voice model, so is quite jarring.
According to their docs, that’s all I should need to to, but I can’t figure out why it isn’t working.
nobody is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.