arduino-simple-tts

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

Audio output from text via the indicated audio sink. The text components need to be prerecorded and available as audio files. More...

`#include <TextToSpeechQueue.h>`

## Public Member Functions
| TextToSpeechQueue (SimpleTTSBase &tts, AudioStream &sink, AudioDecoder &decoder, AudioDictionaryBase &dict)
| TextToSpeech which support a SimpleTTSBase.
| TextToSpeechQueue (SimpleTTSBase &tts, AudioOutput &sink, AudioDecoder &decoder, AudioDictionaryBase &dict)
| TextToSpeechQueue (AudioStream &sink, AudioDecoder &decoder, AudioDictionaryBase &dict)
| Default Constructor.
void | say (const char *word)
| a simple API to add a single c string to the queue
void | sayNow (const char *word)
| Adds a word to the front.
void | say (const char *word[], int size)
| Addds an array of c strings.
template<size_t N>
void | say (char *(&word)[N])
| Addds an array of c strings.
void | say (audio_tools::Vector< const char * > words)
| a simple API to say multiple of the supported words
void | process ()
void | processWord (const char *word)
| Output of word to audio sink.
void | silence (int n=1)
| Sends silence to mp3 decoder for n secods.
size_t | size ()
| Returns the number of words to be spoken in the queue.
bool | isEmpty ()
| Returns true if the queue is empty.
const char * | operator[] (int n)
| Determines the nth word in the queue.
void | begin ()
| Opens the processing.
void | end ()
| Ends the processing and clears the queue.
void | clear ()
| Clears the queue.
void | delay (uint32_t delay_ms=1000)
| writes silence for the indicated ms

## Static Protected Member Functions
static void | callback (audio_tools::Vector< const char * > words, void *ref)
| callback which adds the words to the queue

## Protected Attributes
Vector< const char * > | queue
bool | active = false
NumberToText | ntt
audio_tools::AudioDecoder * | p_decoder = nullptr
audio_tools::EncodedAudioStream * | decodedStream = nullptr
SimpleTTSBase * | p_tts = nullptr
AudioDictionaryBase * | p_dictionary
audio_tools::StreamCopy | copier
Print * | p_sink = nullptr

## Detailed Description

Audio output from text via the indicated audio sink. The text components need to be prerecorded and available as audio files.

Author
  Phil Schatzmann

Copyright
  GPLv3

## Member Data Documentation

## ◆ p_dictionary

AudioDictionaryBase* simple_tts::TextToSpeechQueue::p_dictionary
| protected

Initial value:
=
nullptr

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

- src/TextToSpeechQueue.h