Arduino ESpeak-NG
Data Structures | Macros | Typedefs | Enumerations | Functions
speak_lib.h File Reference
#include <stdio.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  espeak_EVENT
 
struct  espeak_VOICE
 

Macros

#define ESPEAK_API
 
#define ESPEAK_API_REVISION   12
 
#define espeakRATE_MINIMUM   80
 
#define espeakRATE_MAXIMUM   450
 
#define espeakRATE_NORMAL   175
 
#define espeakINITIALIZE_PHONEME_EVENTS   0x0001
 
#define espeakINITIALIZE_PHONEME_IPA   0x0002
 
#define espeakINITIALIZE_DONT_EXIT   0x8000
 
#define espeakCHARS_AUTO   0
 
#define espeakCHARS_UTF8   1
 
#define espeakCHARS_8BIT   2
 
#define espeakCHARS_WCHAR   3
 
#define espeakCHARS_16BIT   4
 
#define espeakSSML   0x10
 
#define espeakPHONEMES   0x100
 
#define espeakENDPAUSE   0x1000
 
#define espeakKEEP_NAMEDATA   0x2000
 
#define espeakPHONEMES_SHOW   0x01
 
#define espeakPHONEMES_IPA   0x02
 
#define espeakPHONEMES_TRACE   0x08
 
#define espeakPHONEMES_MBROLA   0x10
 
#define espeakPHONEMES_TIE   0x80
 

Typedefs

typedef int() t_espeak_callback(short *, int, espeak_EVENT *)
 

Enumerations

enum  espeak_EVENT_TYPE {
  espeakEVENT_LIST_TERMINATED = 0 , espeakEVENT_WORD = 1 , espeakEVENT_SENTENCE = 2 , espeakEVENT_MARK = 3 ,
  espeakEVENT_PLAY = 4 , espeakEVENT_END = 5 , espeakEVENT_MSG_TERMINATED = 6 , espeakEVENT_PHONEME = 7 ,
  espeakEVENT_SAMPLERATE = 8
}
 
enum  espeak_POSITION_TYPE { POS_CHARACTER = 1 , POS_WORD , POS_SENTENCE }
 
enum  espeak_AUDIO_OUTPUT { AUDIO_OUTPUT_PLAYBACK , AUDIO_OUTPUT_RETRIEVAL , AUDIO_OUTPUT_SYNCHRONOUS , AUDIO_OUTPUT_SYNCH_PLAYBACK }
 
enum  espeak_ERROR { EE_OK =0 , EE_INTERNAL_ERROR =-1 , EE_BUFFER_FULL =1 , EE_NOT_FOUND =2 }
 
enum  espeak_PARAMETER {
  espeakSILENCE =0 , espeakRATE =1 , espeakVOLUME =2 , espeakPITCH =3 ,
  espeakRANGE =4 , espeakPUNCTUATION =5 , espeakCAPITALS =6 , espeakWORDGAP =7 ,
  espeakOPTIONS =8 , espeakINTONATION =9 , espeakRESERVED1 =10 , espeakRESERVED2 =11 ,
  espeakEMPHASIS , espeakLINELENGTH , espeakVOICETYPE , N_SPEECH_PARAM
}
 
enum  espeak_PUNCT_TYPE { espeakPUNCT_NONE =0 , espeakPUNCT_ALL =1 , espeakPUNCT_SOME =2 }
 

Functions

int espeak_Initialize (espeak_AUDIO_OUTPUT output, int buflength, const char *path, int options)
 
void espeak_SetSynthCallback (t_espeak_callback *SynthCallback)
 
void espeak_SetUriCallback (int(*UriCallback)(int, const char *, const char *))
 
void espeak_SetPhonemeCallback (int(*PhonemeCallback)(const char *))
 
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_ERROR espeak_Synth_Mark (const void *text, size_t size, const char *index_mark, unsigned int end_position, unsigned int flags, unsigned int *unique_identifier, void *user_data)
 
espeak_ERROR espeak_Key (const char *key_name)
 
espeak_ERROR espeak_Char (wchar_t character)
 
espeak_ERROR espeak_SetParameter (espeak_PARAMETER parameter, int value, int relative)
 
int espeak_GetParameter (espeak_PARAMETER parameter, int current)
 
espeak_ERROR espeak_SetPunctuationList (const wchar_t *punctlist)
 
void espeak_SetPhonemeTrace (int phonememode, FILE *stream)
 
const char * espeak_TextToPhonemes (const void **textptr, int textmode, int phonememode)
 
void espeak_CompileDictionary (const char *path, FILE *log, int flags)
 
const espeak_VOICE ** espeak_ListVoices (espeak_VOICE *voice_spec)
 
espeak_ERROR espeak_SetVoiceByFile (const char *filename)
 
espeak_ERROR espeak_SetVoiceByName (const char *name)
 
espeak_ERROR espeak_SetVoiceByProperties (espeak_VOICE *voice_spec)
 
espeak_VOICEespeak_GetCurrentVoice (void)
 
espeak_ERROR espeak_Cancel (void)
 
int espeak_IsPlaying (void)
 
espeak_ERROR espeak_Synchronize (void)
 
espeak_ERROR espeak_Terminate (void)
 
const char * espeak_Info (const char **path_data)
 

Macro Definition Documentation

◆ ESPEAK_API

#define ESPEAK_API

◆ ESPEAK_API_REVISION

#define ESPEAK_API_REVISION   12

◆ espeakCHARS_16BIT

#define espeakCHARS_16BIT   4

◆ espeakCHARS_8BIT

#define espeakCHARS_8BIT   2

◆ espeakCHARS_AUTO

#define espeakCHARS_AUTO   0

◆ espeakCHARS_UTF8

#define espeakCHARS_UTF8   1

◆ espeakCHARS_WCHAR

#define espeakCHARS_WCHAR   3

◆ espeakENDPAUSE

#define espeakENDPAUSE   0x1000

◆ espeakINITIALIZE_DONT_EXIT

#define espeakINITIALIZE_DONT_EXIT   0x8000

◆ espeakINITIALIZE_PHONEME_EVENTS

#define espeakINITIALIZE_PHONEME_EVENTS   0x0001

◆ espeakINITIALIZE_PHONEME_IPA

#define espeakINITIALIZE_PHONEME_IPA   0x0002

◆ espeakKEEP_NAMEDATA

#define espeakKEEP_NAMEDATA   0x2000

◆ espeakPHONEMES

#define espeakPHONEMES   0x100

◆ espeakPHONEMES_IPA

#define espeakPHONEMES_IPA   0x02

◆ espeakPHONEMES_MBROLA

#define espeakPHONEMES_MBROLA   0x10

◆ espeakPHONEMES_SHOW

#define espeakPHONEMES_SHOW   0x01

◆ espeakPHONEMES_TIE

#define espeakPHONEMES_TIE   0x80

◆ espeakPHONEMES_TRACE

#define espeakPHONEMES_TRACE   0x08

◆ espeakRATE_MAXIMUM

#define espeakRATE_MAXIMUM   450

◆ espeakRATE_MINIMUM

#define espeakRATE_MINIMUM   80

◆ espeakRATE_NORMAL

#define espeakRATE_NORMAL   175

◆ espeakSSML

#define espeakSSML   0x10

Typedef Documentation

◆ t_espeak_callback

typedef int() t_espeak_callback(short *, int, espeak_EVENT *)

Enumeration Type Documentation

◆ espeak_AUDIO_OUTPUT

Enumerator
AUDIO_OUTPUT_PLAYBACK 
AUDIO_OUTPUT_RETRIEVAL 
AUDIO_OUTPUT_SYNCHRONOUS 
AUDIO_OUTPUT_SYNCH_PLAYBACK 

◆ espeak_ERROR

Enumerator
EE_OK 
EE_INTERNAL_ERROR 
EE_BUFFER_FULL 
EE_NOT_FOUND 

◆ espeak_EVENT_TYPE

Enumerator
espeakEVENT_LIST_TERMINATED 
espeakEVENT_WORD 
espeakEVENT_SENTENCE 
espeakEVENT_MARK 
espeakEVENT_PLAY 
espeakEVENT_END 
espeakEVENT_MSG_TERMINATED 
espeakEVENT_PHONEME 
espeakEVENT_SAMPLERATE 

◆ espeak_PARAMETER

Enumerator
espeakSILENCE 
espeakRATE 
espeakVOLUME 
espeakPITCH 
espeakRANGE 
espeakPUNCTUATION 
espeakCAPITALS 
espeakWORDGAP 
espeakOPTIONS 
espeakINTONATION 
espeakRESERVED1 
espeakRESERVED2 
espeakEMPHASIS 
espeakLINELENGTH 
espeakVOICETYPE 
N_SPEECH_PARAM 

◆ espeak_POSITION_TYPE

Enumerator
POS_CHARACTER 
POS_WORD 
POS_SENTENCE 

◆ espeak_PUNCT_TYPE

Enumerator
espeakPUNCT_NONE 
espeakPUNCT_ALL 
espeakPUNCT_SOME 

Function Documentation

◆ espeak_Cancel()

espeak_ERROR espeak_Cancel ( void  )

◆ espeak_Char()

espeak_ERROR espeak_Char ( wchar_t  character)

◆ espeak_CompileDictionary()

void espeak_CompileDictionary ( const char *  path,
FILE *  log,
int  flags 
)

◆ espeak_GetCurrentVoice()

espeak_VOICE* espeak_GetCurrentVoice ( void  )

◆ espeak_GetParameter()

int espeak_GetParameter ( espeak_PARAMETER  parameter,
int  current 
)

◆ espeak_Info()

const char* espeak_Info ( const char **  path_data)

◆ espeak_Initialize()

int espeak_Initialize ( espeak_AUDIO_OUTPUT  output,
int  buflength,
const char *  path,
int  options 
)

◆ espeak_IsPlaying()

int espeak_IsPlaying ( void  )

◆ espeak_Key()

espeak_ERROR espeak_Key ( const char *  key_name)

◆ espeak_ListVoices()

const espeak_VOICE** espeak_ListVoices ( espeak_VOICE voice_spec)

◆ espeak_SetParameter()

espeak_ERROR espeak_SetParameter ( espeak_PARAMETER  parameter,
int  value,
int  relative 
)

◆ espeak_SetPhonemeCallback()

void espeak_SetPhonemeCallback ( int(*)(const char *)  PhonemeCallback)

◆ espeak_SetPhonemeTrace()

void espeak_SetPhonemeTrace ( int  phonememode,
FILE *  stream 
)

◆ espeak_SetPunctuationList()

espeak_ERROR espeak_SetPunctuationList ( const wchar_t *  punctlist)

◆ espeak_SetSynthCallback()

void espeak_SetSynthCallback ( t_espeak_callback SynthCallback)

◆ espeak_SetUriCallback()

void espeak_SetUriCallback ( int(*)(int, const char *, const char *)  UriCallback)

◆ espeak_SetVoiceByFile()

espeak_ERROR espeak_SetVoiceByFile ( const char *  filename)

◆ espeak_SetVoiceByName()

espeak_ERROR espeak_SetVoiceByName ( const char *  name)

◆ espeak_SetVoiceByProperties()

espeak_ERROR espeak_SetVoiceByProperties ( espeak_VOICE voice_spec)

◆ espeak_Synchronize()

espeak_ERROR espeak_Synchronize ( void  )

◆ espeak_Synth()

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_Synth_Mark()

espeak_ERROR espeak_Synth_Mark ( const void *  text,
size_t  size,
const char *  index_mark,
unsigned int  end_position,
unsigned int  flags,
unsigned int *  unique_identifier,
void *  user_data 
)

◆ espeak_Terminate()

espeak_ERROR espeak_Terminate ( void  )

◆ espeak_TextToPhonemes()

const char* espeak_TextToPhonemes ( const void **  textptr,
int  textmode,
int  phonememode 
)