Skip to content

Read a code aloud in the listener's language - #68

Merged
octopranav merged 1 commit into
mainfrom
read-aloud-language
Sep 24, 2026
Merged

octopranav merged 1 commit into
mainfrom
read-aloud-language

Conversation

@octopranav

Copy link
Copy Markdown
Owner

What changes

Core

  • Spellings.kt holds seven listeners' languages. Each has:
    • its speakers' spelling table for the fifteen letters
    • the digits as that language says them
    • its words for the check character, the decimal point and minus
    • the emergency card's spoken line
  • The languages are listed by their own names:
    • Deutsch (DIN 5009:2022, with "zwo" for two)
    • English (the international words, as before)
    • Español
    • Français
    • Italiano
    • Nederlands (the official table of the Netherlands, with "één" for one)
    • Svenska
  • aloud, aloudArea and the new aloudCoordinates take a Spelling. PlaceState.view(locale, listener) speaks every line in the listener's words. The emergency card gains said, its whole spoken line in the listener's language.

App

  • The read-aloud section has a new chooser, "The listener's language". Each language shows its first three words, for example "Deutsch · Chemnitz, Düsseldorf, Frankfurt". The choice is kept across launches. Until one is chosen, it follows the reader's own language, falling back to the international words.
  • Lines are spoken in the listener's language's voice. When the device has none, the section says so, the button turns off, and "Add a voice" opens the speech engine's voice installer. Buttons elsewhere show a short notice instead.

Decisions

  • Every callout begins with its letter. Appendix D.2: the listener keeps the first character. The Italian table gives letter names for H, J, K, W and X, and the name of K begins with C. So the table's own alternatives are used: Hotel, Jolly, Kursaal, Washington, Xilofono.
  • German uses the 2022 towns, not the older first names. The towns are the current standard, and every word still begins with its letter.
  • Spanish has no national table. The words follow the old telephone table from Spain, with Granada for G, because the G of Gerona is said as a J.
  • Coordinates are read digit by digit after the point. A voice for a decimal-comma language may take the full stop for a thousands separator. They are read from the written text, so what is heard matches the screen.
  • No line is spoken in another language's voice.

Checks

  • Core: 140 tests pass, 9 of them new:
    • every word begins with its letter
    • ten distinct digits in each language
    • the order of names and language matching
    • German, French, Italian and Swedish lines for the specification's example
    • "zwo" and "één"
    • coordinates in English, German and Spanish
    • the view and the emergency card read in Italian
  • Deliberate break: giving Italian K the word "Cappa" failed the rule test with "Italiano: Cappa for K, expected K but was C".
  • Emulator:
    • The chooser lists all seven languages.
    • Choosing Deutsch gives "Goslar, drei, Rostock, Jena, München; neun, acht, Nürnberg, München, neun; Prüfzeichen Tübingen".
    • Read aloud sent a German synthesis request to the speech engine, which opened an audio track.
    • The choice was kept after a relaunch.
    • The emergency card showed and spoke the German line.
    • A temporary build with no Swedish voice showed the note and "Add a voice" and turned the button off. That build was reverted.

The code is the same ten characters in every language; only the words that
carry it change. The read-aloud section now offers seven listeners'
languages, each with its own speakers' spelling table: German (DIN 5009,
2022), English (the international words), Spanish, French, Italian, Dutch
and Swedish, with the digits as that language says them and its word for
the check character. The choice is remembered and applies to the place, to
an area and to the emergency card, which then reads the coordinates too in
that language, digit by digit after the point.

Every callout begins with its letter, as appendix D.2 requires, so the
Italian table's alternative words replace the letter names it gives for H,
J, K, W and X; a test holds every set to that. A line is spoken only in a
voice for its language. With none on the device, the button is off, the
words stay on screen and the speech engine's voice installer is one tap away.
@octopranav
octopranav merged commit 138aaab into main Sep 24, 2026
21 checks passed
@octopranav
octopranav deleted the read-aloud-language branch September 24, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant