arduino-simple-tts

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
simple_tts::NumberToText Class Reference

Translates a number into englich words. More...

`#include <NumberToText.h>`

Inheritance diagram for simple_tts::NumberToText:

## Public Member Functions
audio_tools::Vector< const char * > & | say (double value, int decimals=2)
| converts a real number to it's text representation (with the indicated number of digits)
audio_tools::Vector< const char * > & | say (int64_t wholeNumber)
audio_tools::Vector< const char * > & | say (const char *wholeNumber, const char *decimals="")
| converts a number to it's text representation
audio_tools::Vector< const char * > & | allTexts ()
| provides all texts
Public Member Functions inherited from simple_tts::SimpleTTSBase
virtual audio_tools::Vector< const char * > & | allTexts ()=0
virtual void | registerCallback (void(*ptr)(audio_tools::Vector< const char * > words, void *refx), void *ref)
void | printCSV (Print &out)

## Protected Member Functions
void | add (const char *str)
void | convertDecimals (const char *decimals)
void | convert (const char *strValue)
void | convert (int64_t value)

## Protected Attributes
audio_tools::Vector< const char * > | result
const char * | first [20]
const char * | second [10]
const char * | third [7] = {"AND","DOT","MINUS", "HUNDRED", "THOUSAND", "MILLION","BILLION"}
const int | AND = 0
const int | DOT = 1
const int | MINUS = 2
const int | HUNDRED = 3
const int | THOUSAND = 4
const int | MILLION = 5
const int | BILLION = 6
Protected Attributes inherited from simple_tts::SimpleTTSBase
void(* | callback )(audio_tools::Vector< const char * > word, void *ref) = nullptr
void * | reference = nullptr

## Detailed Description

Translates a number into englich words.

Author
  Phil Schatzmann

Copyright
  GPLv3

## Member Function Documentation

## ◆ allTexts()

audio_tools::Vector< const char * > & simple_tts::NumberToText::allTexts | ( |  | ) |
| inlinevirtual

provides all texts

Implements simple_tts::SimpleTTSBase.

## Member Data Documentation

## ◆ first

const char* simple_tts::NumberToText::first[20]
| protected

Initial value:
= {"ZERO", "ONE", "TWO", "THREE",
"FOUR", "FIVE", "SIX", "SEVEN",
"EIGHT", "NINE", "TEN", "ELEVEN",
"TWELVE", "THIRTEEN", "FOURTEEN", "FIFTEEN",
"SIXTEEN", "SEVENTEEN", "EIGHTEEN", "NINETEEN"}

## ◆ second

const char* simple_tts::NumberToText::second[10]
| protected

Initial value:
= {"", "TEN", "TWENTY", "THIRTY", "FORTY",
"FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY"}

The documentation for this class was generated from the following file:

- src/NumberToText.h