From ed5a378b9d54e330ffff5b12c416d7496d000783 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sat, 25 Aug 2018 20:21:38 +0100 Subject: [PATCH] docs: document the tr_languages langopts --- docs/README.md | 1 + docs/numbers.md | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 docs/numbers.md diff --git a/docs/README.md b/docs/README.md index 4a3f0d72..aa7f0d26 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,6 +10,7 @@ - Creating and Editing Languages and Voices - [Adding or Improving a Language](add_language.md) - [Text to Phoneme Translation](dictionary.md) + - [Numbers](numbers.md) - [Voice Files](voices.md) - [MBROLA Voices](mbrola.md) - [Phoneme Tables](phontab.md) diff --git a/docs/numbers.md b/docs/numbers.md new file mode 100644 index 00000000..348fd475 --- /dev/null +++ b/docs/numbers.md @@ -0,0 +1,36 @@ +# Numbers + +- [Language Options](#language-options) + +## Language Options + +The following properties in `tr_languages.c` control how numbers behave for a +language: + + tr->langopts.numbers + tr->langopts.numbers2 + +These controls how numbers are pronounced. + +If `numbers` is set to `0` (the default value), numbers will not be pronounced. +Setting it to `1` will enable number pronunciation using the dictionary rules. + + tr->langopts.max_digits + +This is the maximum number of digits that can be spoken by the language. If the +number of digits is larger than this, the number is spoken digit by digit. + + tr->langopts.break_numbers + +This controls how digits are grouped for speaking large numbers. The default is +to group into 3 digit groups (thousand, million, billion, trillion, etc.). + + tr->langopts.thousands_sep + +The character used to separate digit groups. The default is `,`. + + tr->langopts.decimal_sep + +The character used to separate the integer and decimal parts of a real number. +The default is `.`. +