\hypertarget{_audio_dictionary_8h_source}{}\doxysection{Audio\+Dictionary.\+h}
\label{_audio_dictionary_8h_source}\index{src/AudioDictionary.h@{src/AudioDictionary.h}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00002\ }
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ "{}SimpleTTSBase.h"{}}}
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}ext/silence\_mp3.h"{}}}
\DoxyCodeLine{00005\ }
\DoxyCodeLine{00006\ \textcolor{keyword}{namespace\ }simple\_tts\ \{}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classsimple__tts_1_1_audio_dictionary}{AudioDictionary}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classsimple__tts_1_1_audio_dictionary_base}{AudioDictionaryBase}}\ \ \{}
\DoxyCodeLine{00014\ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00015\ \ \ \mbox{\hyperlink{classsimple__tts_1_1_audio_dictionary}{AudioDictionary}}(\mbox{\hyperlink{structsimple__tts_1_1_audio_dictionary_entry}{AudioDictionaryEntry}}\ *dict)\ \{\ dictionary\ =\ dict;\ \}}
\DoxyCodeLine{00016\ \ \ AudioStream\ *get(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *word)\ \{}
\DoxyCodeLine{00017\ \ \ \ \ \textcolor{keywordflow}{if}\ (word==\textcolor{keyword}{nullptr})\ \textcolor{keywordflow}{return}\ \textcolor{keyword}{nullptr};}
\DoxyCodeLine{00018\ \ \ \ \ Str\ str(word);}
\DoxyCodeLine{00019\ \ \ \ \ \mbox{\hyperlink{structsimple__tts_1_1_audio_dictionary_entry}{AudioDictionaryEntry}}\ *e\ =\ dictionary;}
\DoxyCodeLine{00020\ \ \ \ \ \textcolor{keywordflow}{while}\ (e-\/>name\ !=\ \textcolor{keyword}{nullptr})\ \{}
\DoxyCodeLine{00021\ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (str.equalsIgnoreCase(e-\/>name))\ \{}
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ e-\/>audio;}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \}}
\DoxyCodeLine{00024\ \ \ \ \ \ \ e++;}
\DoxyCodeLine{00025\ \ \ \ \ \}}
\DoxyCodeLine{00026\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{nullptr};}
\DoxyCodeLine{00027\ \ \ \}}
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ \ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00030\ \ \ \mbox{\hyperlink{structsimple__tts_1_1_audio_dictionary_entry}{AudioDictionaryEntry}}\ *dictionary;}
\DoxyCodeLine{00031\ \};}
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ \textcolor{comment}{//\ if\ you\ define\ NO\_EXAMPLES\ we\ do\ not\ include\ any\ example\ audio}}
\DoxyCodeLine{00034\ \textcolor{preprocessor}{\#ifndef\ NO\_AUDIO\_EXAMPLES}}
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ \textcolor{preprocessor}{\#include\ "{}en/all.h"{}}}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00043\ \mbox{\hyperlink{structsimple__tts_1_1_audio_dictionary_entry}{AudioDictionaryEntry}}\ ExampleAudioDictionaryValues[]\ =\ \{}
\DoxyCodeLine{00044\ \ \ \ \ \{\textcolor{stringliteral}{"{}SILENCE"{}},\ \textcolor{keyword}{new}\ MemoryStream(silence\_mp3,\ silence\_mp3\_len)\},}
\DoxyCodeLine{00045\ \ \ \ \ \{\textcolor{stringliteral}{"{}AND"{}},\ \textcolor{keyword}{new}\ MemoryStream(and\_mp3,\ and\_mp3\_len)\},}
\DoxyCodeLine{00046\ \ \ \ \ \{\textcolor{stringliteral}{"{}BILLION"{}},\ \textcolor{keyword}{new}\ MemoryStream(billion\_mp3,\ billion\_mp3\_len)\},}
\DoxyCodeLine{00047\ \ \ \ \ \{\textcolor{stringliteral}{"{}DOT"{}},\ \textcolor{keyword}{new}\ MemoryStream(dot\_mp3,\ dot\_mp3\_len)\},}
\DoxyCodeLine{00048\ \ \ \ \ \{\textcolor{stringliteral}{"{}EIGHT"{}},\ \textcolor{keyword}{new}\ MemoryStream(eight\_mp3,\ eight\_mp3\_len)\},}
\DoxyCodeLine{00049\ \ \ \ \ \{\textcolor{stringliteral}{"{}EIGHTEEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(eighteen\_mp3,\ eighteen\_mp3\_len)\},}
\DoxyCodeLine{00050\ \ \ \ \ \{\textcolor{stringliteral}{"{}EIGHTY"{}},\ \textcolor{keyword}{new}\ MemoryStream(eighty\_mp3,\ eighty\_mp3\_len)\},}
\DoxyCodeLine{00051\ \ \ \ \ \{\textcolor{stringliteral}{"{}ELEVEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(eleven\_mp3,\ eleven\_mp3\_len)\},}
\DoxyCodeLine{00052\ \ \ \ \ \{\textcolor{stringliteral}{"{}FIFTEEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(fifteen\_mp3,\ fifteen\_mp3\_len)\},}
\DoxyCodeLine{00053\ \ \ \ \ \{\textcolor{stringliteral}{"{}FIFTY"{}},\ \textcolor{keyword}{new}\ MemoryStream(fifty\_mp3,\ fifty\_mp3\_len)\},}
\DoxyCodeLine{00054\ \ \ \ \ \{\textcolor{stringliteral}{"{}FIVE"{}},\ \textcolor{keyword}{new}\ MemoryStream(five\_mp3,\ five\_mp3\_len)\},}
\DoxyCodeLine{00055\ \ \ \ \ \{\textcolor{stringliteral}{"{}FOUR"{}},\ \textcolor{keyword}{new}\ MemoryStream(four\_mp3,\ four\_mp3\_len)\},}
\DoxyCodeLine{00056\ \ \ \ \ \{\textcolor{stringliteral}{"{}FOURTEEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(fourteen\_mp3,\ fourteen\_mp3\_len)\},}
\DoxyCodeLine{00057\ \ \ \ \ \{\textcolor{stringliteral}{"{}FORTY"{}},\ \textcolor{keyword}{new}\ MemoryStream(forty\_mp3,\ forty\_mp3\_len)\},}
\DoxyCodeLine{00058\ \ \ \ \ \{\textcolor{stringliteral}{"{}HUNDRED"{}},\ \textcolor{keyword}{new}\ MemoryStream(hundred\_mp3,\ hundred\_mp3\_len)\},}
\DoxyCodeLine{00059\ \ \ \ \ \{\textcolor{stringliteral}{"{}MILLION"{}},\ \textcolor{keyword}{new}\ MemoryStream(million\_mp3,\ million\_mp3\_len)\},}
\DoxyCodeLine{00060\ \ \ \ \ \{\textcolor{stringliteral}{"{}MINUS"{}},\ \textcolor{keyword}{new}\ MemoryStream(minus\_mp3,\ minus\_mp3\_len)\},}
\DoxyCodeLine{00061\ \ \ \ \ \{\textcolor{stringliteral}{"{}NINE"{}},\ \textcolor{keyword}{new}\ MemoryStream(nine\_mp3,\ nine\_mp3\_len)\},}
\DoxyCodeLine{00062\ \ \ \ \ \{\textcolor{stringliteral}{"{}NINETEEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(nineteen\_mp3,\ nineteen\_mp3\_len)\},}
\DoxyCodeLine{00063\ \ \ \ \ \{\textcolor{stringliteral}{"{}NINETY"{}},\ \textcolor{keyword}{new}\ MemoryStream(ninety\_mp3,\ ninety\_mp3\_len)\},}
\DoxyCodeLine{00064\ \ \ \ \ \{\textcolor{stringliteral}{"{}OCLOCK"{}},\ \textcolor{keyword}{new}\ MemoryStream(oclock\_mp3,\ oclock\_mp3\_len)\},}
\DoxyCodeLine{00065\ \ \ \ \ \{\textcolor{stringliteral}{"{}ONE"{}},\ \textcolor{keyword}{new}\ MemoryStream(one\_mp3,\ one\_mp3\_len)\},}
\DoxyCodeLine{00066\ \ \ \ \ \{\textcolor{stringliteral}{"{}SEVEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(seven\_mp3,\ seven\_mp3\_len)\},}
\DoxyCodeLine{00067\ \ \ \ \ \{\textcolor{stringliteral}{"{}SEVENTEEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(seventeen\_mp3,\ seventeen\_mp3\_len)\},}
\DoxyCodeLine{00068\ \ \ \ \ \{\textcolor{stringliteral}{"{}SEVENTY"{}},\ \textcolor{keyword}{new}\ MemoryStream(seventy\_mp3,\ seventy\_mp3\_len)\},}
\DoxyCodeLine{00069\ \ \ \ \ \{\textcolor{stringliteral}{"{}SIX"{}},\ \textcolor{keyword}{new}\ MemoryStream(six\_mp3,\ six\_mp3\_len)\},}
\DoxyCodeLine{00070\ \ \ \ \ \{\textcolor{stringliteral}{"{}SIXTEEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(sixteen\_mp3,\ sixteen\_mp3\_len)\},}
\DoxyCodeLine{00071\ \ \ \ \ \{\textcolor{stringliteral}{"{}SIXTY"{}},\ \textcolor{keyword}{new}\ MemoryStream(sixty\_mp3,\ sixty\_mp3\_len)\},}
\DoxyCodeLine{00072\ \ \ \ \ \{\textcolor{stringliteral}{"{}TEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(ten\_mp3,\ ten\_mp3\_len)\},}
\DoxyCodeLine{00073\ \ \ \ \ \{\textcolor{stringliteral}{"{}THIRTEEN"{}},\ \textcolor{keyword}{new}\ MemoryStream(thirteen\_mp3,\ thirteen\_mp3\_len)\},}
\DoxyCodeLine{00074\ \ \ \ \ \{\textcolor{stringliteral}{"{}THIRTY"{}},\ \textcolor{keyword}{new}\ MemoryStream(thirty\_mp3,\ thirty\_mp3\_len)\},}
\DoxyCodeLine{00075\ \ \ \ \ \{\textcolor{stringliteral}{"{}THOUSAND"{}},\ \textcolor{keyword}{new}\ MemoryStream(thousand\_mp3,\ thousand\_mp3\_len)\},}
\DoxyCodeLine{00076\ \ \ \ \ \{\textcolor{stringliteral}{"{}THREE"{}},\ \textcolor{keyword}{new}\ MemoryStream(three\_mp3,\ three\_mp3\_len)\},}
\DoxyCodeLine{00077\ \ \ \ \ \{\textcolor{stringliteral}{"{}TWELVE"{}},\ \textcolor{keyword}{new}\ MemoryStream(twelve\_mp3,\ twelve\_mp3\_len)\},}
\DoxyCodeLine{00078\ \ \ \ \ \{\textcolor{stringliteral}{"{}TWENTY"{}},\ \textcolor{keyword}{new}\ MemoryStream(twenty\_mp3,\ twenty\_mp3\_len)\},}
\DoxyCodeLine{00079\ \ \ \ \ \{\textcolor{stringliteral}{"{}TWO"{}},\ \textcolor{keyword}{new}\ MemoryStream(two\_mp3,\ two\_mp3\_len)\},}
\DoxyCodeLine{00080\ \ \ \ \ \{\textcolor{stringliteral}{"{}ZERO"{}},\ \textcolor{keyword}{new}\ MemoryStream(zero\_mp3,\ zero\_mp3\_len)\},}
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{comment}{//\ additional\ entries\ to\ support\ time}}
\DoxyCodeLine{00082\ \ \ \ \ \{\textcolor{stringliteral}{"{}AM"{}},\ \textcolor{keyword}{new}\ MemoryStream(am\_mp3,\ am\_mp3\_len)\},}
\DoxyCodeLine{00083\ \ \ \ \ \{\textcolor{stringliteral}{"{}HALF"{}},\ \textcolor{keyword}{new}\ MemoryStream(half\_mp3,\ half\_mp3\_len)\},}
\DoxyCodeLine{00084\ \ \ \ \ \{\textcolor{stringliteral}{"{}ITS"{}},\ \textcolor{keyword}{new}\ MemoryStream(its\_mp3,\ its\_mp3\_len)\},}
\DoxyCodeLine{00085\ \ \ \ \ \{\textcolor{stringliteral}{"{}MIDNIGHT"{}},\ \textcolor{keyword}{new}\ MemoryStream(midnight\_mp3,\ midnight\_mp3\_len)\},}
\DoxyCodeLine{00086\ \ \ \ \ \{\textcolor{stringliteral}{"{}NOON"{}},\ \textcolor{keyword}{new}\ MemoryStream(noon\_mp3,\ noon\_mp3\_len)\},}
\DoxyCodeLine{00087\ \ \ \ \ \{\textcolor{stringliteral}{"{}PAST"{}},\ \textcolor{keyword}{new}\ MemoryStream(past\_mp3,\ past\_mp3\_len)\},}
\DoxyCodeLine{00088\ \ \ \ \ \{\textcolor{stringliteral}{"{}PM"{}},\ \textcolor{keyword}{new}\ MemoryStream(pm\_mp3,\ pm\_mp3\_len)\},}
\DoxyCodeLine{00089\ \ \ \ \ \{\textcolor{stringliteral}{"{}QUARTER"{}},\ \textcolor{keyword}{new}\ MemoryStream(quarter\_mp3,\ quarter\_mp3\_len)\},}
\DoxyCodeLine{00090\ \ \ \ \ \{\textcolor{stringliteral}{"{}TO"{}},\ \textcolor{keyword}{new}\ MemoryStream(to\_mp3,\ to\_mp3\_len)\},}
\DoxyCodeLine{00091\ \ \ \ \ \textcolor{comment}{//\ units}}
\DoxyCodeLine{00092\ \ \ \ \ \{\textcolor{stringliteral}{"{}pound"{}},\ \textcolor{keyword}{new}\ MemoryStream(pound\_mp3,\ pound\_mp3\_len)\},}
\DoxyCodeLine{00093\ \ \ \ \ \{\textcolor{stringliteral}{"{}pounds"{}},\ \textcolor{keyword}{new}\ MemoryStream(pounds\_mp3,\ pounds\_mp3\_len)\},}
\DoxyCodeLine{00094\ \ \ \ \ \{\textcolor{stringliteral}{"{}foot"{}},\ \textcolor{keyword}{new}\ MemoryStream(foot\_mp3,\ foot\_mp3\_len)\},}
\DoxyCodeLine{00095\ \ \ \ \ \{\textcolor{stringliteral}{"{}feet"{}},\ \textcolor{keyword}{new}\ MemoryStream(feet\_mp3,\ feet\_mp3\_len)\},}
\DoxyCodeLine{00096\ \ \ \ \ \{\textcolor{stringliteral}{"{}inch"{}},\ \textcolor{keyword}{new}\ MemoryStream(inch\_mp3,\ inch\_mp3\_len)\},}
\DoxyCodeLine{00097\ \ \ \ \ \{\textcolor{stringliteral}{"{}inches"{}},\ \textcolor{keyword}{new}\ MemoryStream(inches\_mp3,\ inches\_mp3\_len)\},}
\DoxyCodeLine{00098\ \ \ \ \ \{\textcolor{stringliteral}{"{}mile"{}},\ \textcolor{keyword}{new}\ MemoryStream(mile\_mp3,\ mile\_mp3\_len)\},}
\DoxyCodeLine{00099\ \ \ \ \ \{\textcolor{stringliteral}{"{}miles"{}},\ \textcolor{keyword}{new}\ MemoryStream(miles\_mp3,\ miles\_mp3\_len)\},}
\DoxyCodeLine{00100\ \ \ \ \ \{\textcolor{stringliteral}{"{}dollar"{}},\ \textcolor{keyword}{new}\ MemoryStream(dollar\_mp3,\ dollar\_mp3\_len)\},}
\DoxyCodeLine{00101\ \ \ \ \ \{\textcolor{stringliteral}{"{}dollars"{}},\ \textcolor{keyword}{new}\ MemoryStream(dollars\_mp3,\ dollars\_mp3\_len)\},}
\DoxyCodeLine{00102\ \ \ \ \ \{\textcolor{stringliteral}{"{}cent"{}},\ \textcolor{keyword}{new}\ MemoryStream(cent\_mp3,\ cent\_mp3\_len)\},}
\DoxyCodeLine{00103\ \ \ \ \ \{\textcolor{stringliteral}{"{}centi"{}},\ \textcolor{keyword}{new}\ MemoryStream(centi\_mp3,\ centi\_mp3\_len)\},}
\DoxyCodeLine{00104\ \ \ \ \ \{\textcolor{stringliteral}{"{}cents"{}},\ \textcolor{keyword}{new}\ MemoryStream(cents\_mp3,\ cents\_mp3\_len)\},}
\DoxyCodeLine{00105\ \ \ \ \ \{\textcolor{stringliteral}{"{}miles"{}},\ \textcolor{keyword}{new}\ MemoryStream(miles\_mp3,\ miles\_mp3\_len)\},}
\DoxyCodeLine{00106\ \ \ \ \ \{\textcolor{stringliteral}{"{}per"{}},\ \textcolor{keyword}{new}\ MemoryStream(per\_mp3,\ per\_mp3\_len)\},}
\DoxyCodeLine{00107\ \ \ \ \ \{\textcolor{stringliteral}{"{}hour"{}},\ \textcolor{keyword}{new}\ MemoryStream(hour\_mp3,\ hour\_mp3\_len)\},}
\DoxyCodeLine{00108\ \ \ \ \ \{\textcolor{stringliteral}{"{}degrees"{}},\ \textcolor{keyword}{new}\ MemoryStream(degrees\_mp3,\ degrees\_mp3\_len)\},}
\DoxyCodeLine{00109\ \ \ \ \ \{\textcolor{stringliteral}{"{}celcius"{}},\ \textcolor{keyword}{new}\ MemoryStream(celcius\_mp3,\ celcius\_mp3\_len)\},}
\DoxyCodeLine{00110\ \ \ \ \ \{\textcolor{stringliteral}{"{}fahrenheit"{}},\ \textcolor{keyword}{new}\ MemoryStream(fahrenheit\_mp3,\ fahrenheit\_mp3\_len)\},}
\DoxyCodeLine{00111\ \ \ \ \ \{\textcolor{stringliteral}{"{}percent"{}},\ \textcolor{keyword}{new}\ MemoryStream(percent\_mp3,\ percent\_mp3\_len)\},}
\DoxyCodeLine{00112\ \ \ \ \ \{\textcolor{stringliteral}{"{}liter"{}},\ \textcolor{keyword}{new}\ MemoryStream(liter\_mp3,\ liter\_mp3\_len)\},}
\DoxyCodeLine{00113\ \ \ \ \ \{\textcolor{stringliteral}{"{}milli"{}},\ \textcolor{keyword}{new}\ MemoryStream(milli\_mp3,\ milli\_mp3\_len)\},}
\DoxyCodeLine{00114\ \ \ \ \ \{\textcolor{stringliteral}{"{}meter"{}},\ \textcolor{keyword}{new}\ MemoryStream(meter\_mp3,\ meter\_mp3\_len)\},}
\DoxyCodeLine{00115\ \ \ \ \ \{\textcolor{stringliteral}{"{}kilo"{}},\ \textcolor{keyword}{new}\ MemoryStream(kilo\_mp3,\ kilo\_mp3\_len)\},}
\DoxyCodeLine{00116\ \ \ \ \ \{\textcolor{stringliteral}{"{}gram"{}},\ \textcolor{keyword}{new}\ MemoryStream(gram\_mp3,\ gram\_mp3\_len)\},}
\DoxyCodeLine{00117\ \ \ \ \ \{\textcolor{stringliteral}{"{}us"{}},\ \textcolor{keyword}{new}\ MemoryStream(us\_mp3,\ us\_mp3\_len)\},}
\DoxyCodeLine{00118\ }
\DoxyCodeLine{00119\ \ \ \ \ \textcolor{comment}{//\ must\ end\ with\ nullptr\ to\ mark\ end}}
\DoxyCodeLine{00120\ \ \ \ \ \{\textcolor{keyword}{nullptr},\ \textcolor{keyword}{nullptr}\}}
\DoxyCodeLine{00121\ }
\DoxyCodeLine{00122\ \};}
\DoxyCodeLine{00123\ }
\DoxyCodeLine{00124\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00125\ }
\DoxyCodeLine{00126\ \}}

\end{DoxyCode}
