text-to-speech Greek

I hope some Greek-speaking fellow can give me some help with dealing with ancient (accented) greek, since I found that the speak function doesnt like so many accents. For instance
??? is pronounced ???, unless I replace ? with ?.
?? must be modified into ??
??? into ???
??? into ???
etc.
So, looking to a Greek newspaper I saw that the only accent used is ? ? etc. and ?? must loose the initial apostrophe (“apostrophe”: sorry just now I can remember its right name).
So I made an array of all the possible vowel combinations by which I modify a given string with a second array, replacing ? into ? (etc.) and removing all “apostrophe”.
Yet, by chance, I noticed that removing such “apostrophe” doesnt always work. For instance:
??? is pronounced ???
but ??? is pronounces ? + “greek letter r” + ???
So, can somebody give me some advice in order to deal properly with possible exceptions like ???-???
Thanks,
Carlo

About the ??? question, I think I found the solution: ? must resolve into ?, and ? into ?.
Other suggestions welcome. Thanks,
Carlo

[quote=216232:@Carlo Rubini]About the ??? question, I think I found the solution: ? must resolve into ?, and ? into ?.
Other suggestions welcome. Thanks,
Carlo[/quote]

You may want to create a translation table to strip accents before feeding the speak command. A dictionary can do that easily. It is more powerful than an array, as you can use any combination of characters as key.

Yes, as soon as I load the string, I create a different table to be used if the user decides to listen to the screen-text…
I had a thought also about using a dictionary, but since I lowercase the string to be fed, the resulting number of accented vowels I have to deal with is really moderate, not as many as there are in Character Viewer.

Carlo, I suppose you need to strip all the ancient accented characters to their current (modern) equivalent. So you may result only with ? ? ? ? ? ? ? or for the diphthongs ? ? and ? ?.

Fotis, thanks for confirming. Although I didnt discover yet about the diphthongs.
I proceeded also modifying a single word: ancient ??? into modern ???. In fact, the speak command would speak “ipsilon ???”.
There will be instances of other phonemes not recognized by the speak command (like ?? from the verb to be). So I briefly warn the reader not to expect perfection from a concoction of ancient words and modern voices.
The same apply for latin texts spoken with modern italian voices, and may be aramaic with a hebrew voice.

Carlo, if you want to emulate the ancient type pronunciation you should replace the ?? with ? as ?? is a diphthong that sounds like ?.

Fotis, should I replace ?? with ? in all words? Or only in ??? Applying, more or less the same “rule”, I think I could replace ?? in all the words with ? since both vowels nowadays sound the same. But I fear I may detonate a pronounciation-catastrophe…

Yes. The ?? and ?? should always be replaced with ? as should ?? and ?? and ?? and ??. However if there is an accent on the first letter (e.g. ?? ?? ?? or there is the accent ?? ?? ?? or ?? ?? ?? it means that the 2 characters are pronounced distinctly (e.g. ?? as ?? - 2 sounds). That is the rule…

Unfortunatelly the Speak command in TextEdit stambles. Try for instance ??? (from ???), yet ??? (from ???) sounds OK. Same problems encountered with ? (from ?? or from ??) when it is not part of a word. On the other end, the articles ? and ? are spoken correctly. So it seems that MacSpeechSynthesizer obeys to its own rules, i.e. only modern Greek.