rhdunn / cainteoir-engine

The Cainteoir Text-to-Speech core engine
http://reecedunn.co.uk/cainteoir/
GNU General Public License v3.0
43 stars 8 forks source link

Support reading decimal numbers #41

Open rhdunn opened 11 years ago

rhdunn commented 11 years ago

A decimal number has the form <number> <decimal-point> <number>. The <decimal-point> character is locale-dependent (e.g. it is . in English and , in German).

The first number is read as a cardinal number. The <decimal-point> character should be looked up in the language dictionary (e.g. "point" in English) -- it should use the _point special entry. The second number is read left-to-right as individual digits.

The parse_number method in tts/word_stream.cpp should take a parsing mode (cardinal_ordinal, digits, etc.). This allows it to support special numbers such as years.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1026782-support-reading-decimal-numbers?utm_campaign=plugin&utm_content=tracker%2F254961&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F254961&utm_medium=issues&utm_source=github).