Arduino ESpeak-NG
Public Member Functions | Protected Attributes
ESpeak Class Reference

Simple Arduino C++ class API for ESpeak using PROGMEM. More...

#include <espeak.h>

Inheritance diagram for ESpeak:
ESpeakFiles

Public Member Functions

 ESpeak (Print &out, bool setupEnglish=true)
 
void add (const char *fileName, const void *fileContent, size_t len)
 Adds a configuration file (e.g dictionary or lang). Use the prefix /mem/data/ for the name! More...
 
bool begin (int buflength=500)
 
audio_info audioInfo ()
 Provides information about the sample rate, channels .... More...
 
void setOutputBeginCallback (void(*cb)())
 
void setOutputEndCallback (void(*cb)())
 
bool setVoice (const char *voiceName)
 Defines the voice by i'ts name. More...
 
bool setVoice (espeak_VOICE *voice_spec)
 Defines the voice by it's properties. More...
 
espeak_VOICEvoice ()
 Determiens the current voice. More...
 
void end ()
 Stops the processing. More...
 
bool say (const char *str)
 Outputs the string as sound. More...
 
bool setRate (int rate)
 speaking speed in word per minute. Values 80 to 450. More...
 
bool setVolume (int vol)
 volume in range 0-200 or more. 0=silence, 100=normal full volume, greater values may produce amplitude compression or distortion More...
 
bool setPitch (int pitch)
 PITCH: base pitch, range 0-100. 50=normal. More...
 
bool setPitchRange (int range)
 RANGE: pitch range, range 0-100. 0-monotone, 50=normal. More...
 
bool setPunctuation (espeak_PUNCT_TYPE punct)
 PUNCTUATION: which punctuation characters to announce: value in espeak_PUNCT_TYPE (none, all, some), see espeak_GetParameter() to specify which characters are announced. More...
 
bool setAnnounceCapitals (int caps)
 CAPITALS: announce capital letters by: 0=none, 1=sound icon, 2=spelling, 3 or higher, by raising pitch. This values gives the amount in Hz by which the pitch of a word raised to indicate it has a capital letter. More...
 
bool setWordGap (int gap)
 WORDGAP: pause between words, units of 10mS (at the default speed) More...
 
bool setParameter (espeak_PARAMETER parameter, int value, int relative=0)
 Sets Parameter: espeakRATE, espeakVOLUME etc. More...
 
bool setFlags (int flag)
 sets the flags espeakCHARS_UTF8,espeakCHARS_8BIT,espeakCHARS_WCHAR (by default we use espeakCHARS_AUTO) More...
 

Protected Attributes

file_systems::FileSystemMemory fsm {"/mem"}
 
bool is_setup_english
 
bool is_fs_setup = false
 
const short memory_guard = 23
 
const espeak_AUDIO_OUTPUT output = AUDIO_OUTPUT_SYNCH_PLAYBACK
 
const char * path = "../../../espeak-ng-data-min"
 
void * user_data = nullptr
 
int options = 0
 
unsigned int * identifier = nullptr
 
unsigned int position = 0
 
unsigned int end_position = 0
 
unsigned int flags = espeakCHARS_AUTO
 
espeak_POSITION_TYPE position_type = POS_CHARACTER
 

Detailed Description

Simple Arduino C++ class API for ESpeak using PROGMEM.

Constructor & Destructor Documentation

◆ ESpeak()

ESpeak::ESpeak ( Print &  out,
bool  setupEnglish = true 
)
inline

Member Function Documentation

◆ add()

void ESpeak::add ( const char *  fileName,
const void *  fileContent,
size_t  len 
)
inline

Adds a configuration file (e.g dictionary or lang). Use the prefix /mem/data/ for the name!

◆ audioInfo()

audio_info ESpeakFiles::audioInfo ( )
inlineinherited

Provides information about the sample rate, channels ....

◆ begin()

bool ESpeak::begin ( int  buflength = 500)
inline

◆ end()

void ESpeakFiles::end ( )
inlineinherited

Stops the processing.

◆ say()

bool ESpeakFiles::say ( const char *  str)
inlineinherited

Outputs the string as sound.

◆ setAnnounceCapitals()

bool ESpeakFiles::setAnnounceCapitals ( int  caps)
inlineinherited

CAPITALS: announce capital letters by: 0=none, 1=sound icon, 2=spelling, 3 or higher, by raising pitch. This values gives the amount in Hz by which the pitch of a word raised to indicate it has a capital letter.

◆ setFlags()

bool ESpeakFiles::setFlags ( int  flag)
inlineinherited

sets the flags espeakCHARS_UTF8,espeakCHARS_8BIT,espeakCHARS_WCHAR (by default we use espeakCHARS_AUTO)

◆ setOutputBeginCallback()

void ESpeakFiles::setOutputBeginCallback ( void(*)()  cb)
inlineinherited

◆ setOutputEndCallback()

void ESpeakFiles::setOutputEndCallback ( void(*)()  cb)
inlineinherited

◆ setParameter()

bool ESpeakFiles::setParameter ( espeak_PARAMETER  parameter,
int  value,
int  relative = 0 
)
inlineinherited

Sets Parameter: espeakRATE, espeakVOLUME etc.

◆ setPitch()

bool ESpeakFiles::setPitch ( int  pitch)
inlineinherited

PITCH: base pitch, range 0-100. 50=normal.

◆ setPitchRange()

bool ESpeakFiles::setPitchRange ( int  range)
inlineinherited

RANGE: pitch range, range 0-100. 0-monotone, 50=normal.

◆ setPunctuation()

bool ESpeakFiles::setPunctuation ( espeak_PUNCT_TYPE  punct)
inlineinherited

PUNCTUATION: which punctuation characters to announce: value in espeak_PUNCT_TYPE (none, all, some), see espeak_GetParameter() to specify which characters are announced.

◆ setRate()

bool ESpeakFiles::setRate ( int  rate)
inlineinherited

speaking speed in word per minute. Values 80 to 450.

◆ setVoice() [1/2]

bool ESpeakFiles::setVoice ( const char *  voiceName)
inlineinherited

Defines the voice by i'ts name.

◆ setVoice() [2/2]

bool ESpeakFiles::setVoice ( espeak_VOICE voice_spec)
inlineinherited

Defines the voice by it's properties.

◆ setVolume()

bool ESpeakFiles::setVolume ( int  vol)
inlineinherited

volume in range 0-200 or more. 0=silence, 100=normal full volume, greater values may produce amplitude compression or distortion

◆ setWordGap()

bool ESpeakFiles::setWordGap ( int  gap)
inlineinherited

WORDGAP: pause between words, units of 10mS (at the default speed)

◆ voice()

espeak_VOICE* ESpeakFiles::voice ( )
inlineinherited

Determiens the current voice.

Field Documentation

◆ end_position

unsigned int ESpeakFiles::end_position = 0
protectedinherited

◆ flags

unsigned int ESpeakFiles::flags = espeakCHARS_AUTO
protectedinherited

◆ fsm

file_systems::FileSystemMemory ESpeak::fsm {"/mem"}
protected

◆ identifier

unsigned int* ESpeakFiles::identifier = nullptr
protectedinherited

◆ is_fs_setup

bool ESpeak::is_fs_setup = false
protected

◆ is_setup_english

bool ESpeak::is_setup_english
protected

◆ memory_guard

const short ESpeakFiles::memory_guard = 23
protectedinherited

◆ options

int ESpeakFiles::options = 0
protectedinherited

◆ output

const espeak_AUDIO_OUTPUT ESpeakFiles::output = AUDIO_OUTPUT_SYNCH_PLAYBACK
protectedinherited

◆ path

const char* ESpeakFiles::path = "../../../espeak-ng-data-min"
protectedinherited

◆ position

unsigned int ESpeakFiles::position = 0
protectedinherited

◆ position_type

espeak_POSITION_TYPE ESpeakFiles::position_type = POS_CHARACTER
protectedinherited

◆ user_data

void* ESpeakFiles::user_data = nullptr
protectedinherited

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