3.5 The Pronunciation Component

The pronunciation of a word depends on the type of text being spoken. For instance, when speaking mathematics, it is important to say “cap gamma” when rendering Γ, whereas when rendering plain text, upper case is not significant. Similarly, if an English document contains French phrases, these should be pronounced according to French pronunciation rules.

We model pronunciation as a separate component of the audio formatter. The corresponding state space is discrete, with points representing different pronunciation modes. Notice that the pronunciation component does not correspond to a separate hardware component of the audio formatter.

Example of Use

Consider a document that describes the career of the French mathematician Galois. The introduction might read:

The works of Galois were, as we know, published in 1846 by Liouville, in the Journal de Mathématiques. It is unfortunate that we do not have the works of the great geometer as an isolated body; thus, the Société mathématique decided to reprint Galois’ papers.

Speaking this using pronunciation rules of English results in poor audio formatting. However, if the French phrases are clearly marked up, as in

\french{Soci\'et\'e math\'ematique}

we can write a rendering rule for object french (See Section 2.4 for details on new objects) as follows:

(defmethod read-aloud ((object french))

  "Render a french phrase. "

  (afl:new-block (afl:local-set-state :french)

                 (read-aloud (argument 1 object ))))

This results in the French phrases being pronounced correctly.

In our implementation, the effect of executing (afl:local-set-state :french) is to change the internal pronunciation table that is consulted before pronouncing a word —if the pronunciation for a phrase is not defined in this table, then the word will be mispronounced. In speaking French phrases, this is only an intermediate solution; to truly speak a different language, we need a multilingual speech synthesizer. However, AFL programs remain the same, no matter what the underlying implementation and hardware.