2 #include "config-espk.h"
4 #include "pcaudiolib/audio_object.h"
8 #include "FileSystems.h"
10 #define GUARD_VALUE 23
30 return sample_rate!=-1;
66 bool say(
const char* str){
67 if (str==
nullptr)
return false;
124 const char*
path =
"../../../espeak-ng-data-min";
145 void add(
const char* fileName,
const void* fileContent,
size_t len){
146 fsm.add(fileName, fileContent, len);
165 file_systems::FileSystemMemory
fsm{
"/mem"};
void(* audio_stream_start_callback)()
void espeak_set_audio_output(Print *p)
Defines the audio output.
audio_info espeak_get_audio_info()
Provides the audio information.
void(* audio_stream_stop_callback)()
Simple Arduino C++ class API for ESpeak using files.
Definition: espeak.h:14
bool setFlags(int flag)
sets the flags espeakCHARS_UTF8,espeakCHARS_8BIT,espeakCHARS_WCHAR (by default we use espeakCHARS_AUT...
Definition: espeak.h:116
unsigned int flags
Definition: espeak.h:130
bool setPunctuation(espeak_PUNCT_TYPE punct)
PUNCTUATION: which punctuation characters to announce: value in espeak_PUNCT_TYPE (none,...
Definition: espeak.h:96
void end()
Stops the processing.
Definition: espeak.h:61
const short memory_guard
Definition: espeak.h:122
espeak_VOICE * voice()
Determiens the current voice.
Definition: espeak.h:56
bool setParameter(espeak_PARAMETER parameter, int value, int relative=0)
Sets Parameter: espeakRATE, espeakVOLUME etc.
Definition: espeak.h:111
bool setPitch(int pitch)
PITCH: base pitch, range 0-100. 50=normal.
Definition: espeak.h:86
const espeak_AUDIO_OUTPUT output
Definition: espeak.h:123
unsigned int * identifier
Definition: espeak.h:127
bool begin(int buflength=5)
Starts the processing. Optionally add all relevant configuration files be fore calling this method.
Definition: espeak.h:28
bool setRate(int rate)
speaking speed in word per minute. Values 80 to 450.
Definition: espeak.h:76
void * user_data
Definition: espeak.h:125
bool setVolume(int vol)
volume in range 0-200 or more. 0=silence, 100=normal full volume, greater values may produce amplitud...
Definition: espeak.h:81
unsigned int end_position
Definition: espeak.h:129
espeak_POSITION_TYPE position_type
Definition: espeak.h:131
ESpeakFiles(Print &out, const char *path="../../../espeak-ng-data")
Definition: espeak.h:16
bool setVoice(const char *voiceName)
Defines the voice by i'ts name.
Definition: espeak.h:44
unsigned int position
Definition: espeak.h:128
int options
Definition: espeak.h:126
void setOutputEndCallback(void(*cb)())
Definition: espeak.h:39
void setOutputBeginCallback(void(*cb)())
Definition: espeak.h:34
bool setVoice(espeak_VOICE *voice_spec)
Defines the voice by it's properties.
Definition: espeak.h:50
bool setPitchRange(int range)
RANGE: pitch range, range 0-100. 0-monotone, 50=normal.
Definition: espeak.h:91
const char * path
Definition: espeak.h:124
bool setAnnounceCapitals(int caps)
CAPITALS: announce capital letters by: 0=none, 1=sound icon, 2=spelling, 3 or higher,...
Definition: espeak.h:101
bool setWordGap(int gap)
WORDGAP: pause between words, units of 10mS (at the default speed)
Definition: espeak.h:106
bool say(const char *str)
Outputs the string as sound.
Definition: espeak.h:66
audio_info audioInfo()
Provides information about the sample rate, channels ....
Definition: espeak.h:25
Simple Arduino C++ class API for ESpeak using PROGMEM.
Definition: espeak.h:138
bool is_fs_setup
Definition: espeak.h:167
bool begin(int buflength=500)
Definition: espeak.h:149
ESpeak(Print &out, bool setupEnglish=true)
Definition: espeak.h:140
bool is_setup_english
Definition: espeak.h:166
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!
Definition: espeak.h:145
file_systems::FileSystemMemory fsm
Definition: espeak.h:165
unsigned int espeak_ng_data_lang_gmw_en_len
Definition: en.h:15
unsigned int espeak_ng_data_en_dict_len
Definition: en_dict.h:13913
#define GUARD_VALUE
Definition: espeak.h:10
unsigned int espeak_ng_data_intonations_len
Definition: intonations.h:173
unsigned int espeak_ng_data_phondata_len
Definition: phondata.h:45872
unsigned int espeak_ng_data_phonindex_len
Definition: phonindex.h:3259
unsigned int espeak_ng_data_phontab_len
Definition: phontab.h:4650
espeak_VOICE * espeak_GetCurrentVoice(void)
espeak_ERROR
Definition: speak_lib.h:184
@ EE_OK
Definition: speak_lib.h:185
espeak_PUNCT_TYPE
Definition: speak_lib.h:428
espeak_AUDIO_OUTPUT
Definition: speak_lib.h:168
@ AUDIO_OUTPUT_SYNCH_PLAYBACK
Definition: speak_lib.h:179
espeak_POSITION_TYPE
Definition: speak_lib.h:161
@ POS_CHARACTER
Definition: speak_lib.h:162
espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_spec)
#define espeakCHARS_AUTO
Definition: speak_lib.h:280
espeak_ERROR espeak_Terminate(void)
espeak_ERROR espeak_Synth(const void *text, size_t size, unsigned int position, espeak_POSITION_TYPE position_type, unsigned int end_position, unsigned int flags, unsigned int *unique_identifier, void *user_data)
espeak_PARAMETER
Definition: speak_lib.h:408
@ espeakRANGE
Definition: speak_lib.h:413
@ espeakWORDGAP
Definition: speak_lib.h:416
@ espeakVOLUME
Definition: speak_lib.h:411
@ espeakPITCH
Definition: speak_lib.h:412
@ espeakRATE
Definition: speak_lib.h:410
@ espeakCAPITALS
Definition: speak_lib.h:415
@ espeakPUNCTUATION
Definition: speak_lib.h:414
espeak_ERROR espeak_SetVoiceByName(const char *name)
espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int relative)
int espeak_Initialize(espeak_AUDIO_OUTPUT output, int buflength, const char *path, int options)
info about sample rate and channels and output stream
Definition: audio_object.h:9
Definition: speak_lib.h:564