Skip to content

Writing Pronunciations

The Cynthia lexicon is a plain text file of words and their pronunciations in cpbet (The Cynthia Pronouncing Alphabet). A word in the lexicon is said that way by every Assistivox voice that takes phonemes: Kokoro and Piper in the browser. The device voice reads words, so the lexicon does not change it.

The file is src/cynthia/lexicon.cpbet in the Assistivox source. Today it is edited there, and a change reaches the app with its next release. Assistivox does not yet have a way to add pronunciations from inside the app.

Each line has a word, an accent if the line is for one accent only, and the word’s transcription:

ay ' eI
zee Br ' z e d
copied ' k D p i d
  • The word is written as it is spelled in text. A word in small letters also covers the same word with a capital, at the start of a sentence. A word with a capital, such as a name, also covers the small-letter spelling, unless the dictionary has that spelling as a word of its own: Bill would not change bill.
  • The accent is Am for American English or Br for British English. Without it, the line is for both.
  • The transcription is cpbet symbols with spaces between them, and a stress mark before each stressed syllable: ' for primary stress, , for secondary. : after a vowel is length: ' s i: is see, and the last vowel of ' h ae p i (happy) is short.
  • # starts a comment, to the end of the line. Blank lines are ignored.

A word can have one line for both accents, a line for each accent, or a line for one accent only. When a word has a line for both and a line for one accent, that accent uses its own line. An accent with no line for the word keeps the dictionary’s pronunciation.

Write the word once when British and American English differ only in the way they differ in every word. cpbet’s vowels carry those differences. ' g oU t is /ɡəʊt/ in British English and /ɡoʊt/ in American English. ' k D p i d is /ˈkɒpid/ and /ˈkɑpid/.

Give the word a line for each accent when it differs in its own way. zee has a British line, ' z e d, so British voices say “zed”; American voices keep the dictionary’s “zee”.

A word in the lexicon also sets the pronunciation of its plural and possessive (-s), past (-ed) and -ing forms. Assistivox builds these the way its dictionaries do, from the stem. copied needed its own line because its stem, copy, does not give it.

The stress mark stands where the stressed syllable starts: I k ' s p l eI n says that the stressed syllable of explain begins with /s/. The checker compares that with Cynthia’s syllable rules and notes any word where they start the syllable somewhere else. A note is not an error; it says that you and the rules divide the word differently.

From the Assistivox source folder:

npx esbuild tools/pronouncer/check_cynthia.ts --bundle --platform=node --outfile=/tmp/check_cynthia.cjs
node /tmp/check_cynthia.cjs

The checker reports every line it cannot read, with its line number and the reason:

  • a symbol that is not cpbet: "ow" is not a cpbet symbol.
  • a stress mark with no vowel after it: A stress mark has no vowel after it.
  • two stress marks with no vowel between them
  • a line with a word and no transcription
  • an IPA vowel that English does not have, such as o, with the English vowel to write

It also notes, without leaving the line out: the old spellings ch and jh, with what to write now (tsh and dzh); and a transcription with no vowel, which is right for words like hmm and shh and otherwise a slip.

It then lists each entry as the voices receive it, for each accent, and the notes about stress marks and syllables. A line the checker cannot read is left out of the app, and the dictionary’s pronunciation is kept for that word.

Words given after the command are shown divided into syllables, in both accents: node /tmp/check_cynthia.cjs copied laughter.

The lexicon holds the pronunciation of single words. Rules that change pronunciations, such as flapping, syllabic consonants and vowel reduction, are planned next, written over cpbet’s features.