Merge branch 'master' into build

This commit is contained in:
Reece Dunn
2011-03-14 22:39:19 +00:00
130 changed files with 4808 additions and 1934 deletions
+3 -1
View File
@@ -18,6 +18,8 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef SPEECH_H
#define SPEECH_H
#define LOG_FRAMES // write keyframe info to src/log
@@ -37,7 +39,6 @@
//#define USE_NANOSLEEP
#define NO_VARIADIC_MACROS
#define __cdecl
#define ESPEAK_API
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\espeak-data"
typedef unsigned short USHORT;
@@ -63,3 +64,4 @@ int GetFileLength(const char *filename);
char *Alloc(int size);
void Free(void *ptr);
#endif SPEECH_H
@@ -18,6 +18,8 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef SPEECH_H
#define SPEECH_H
#define LOG_FRAMES // write keyframe info to src/log
@@ -37,7 +39,6 @@
//#define USE_NANOSLEEP
#define NO_VARIADIC_MACROS
#define __cdecl
#define ESPEAK_API
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\espeak-data"
typedef unsigned short USHORT;
@@ -63,3 +64,4 @@ int GetFileLength(const char *filename);
char *Alloc(int size);
void Free(void *ptr);
#endif SPEECH_H
+4 -1
View File
@@ -20,6 +20,9 @@
// Windows command-line version of eSpeak
#ifndef SPEECH_H
#define SPEECH_H
// conditional compilation options
@@ -31,7 +34,6 @@
#define PATHSEP '\\'
#define USE_PORTAUDIO
#define NO_VARIADIC_MACROS
#define ESPEAK_API
#define INCLUDE_KLATT
#define INCLUDE_MBROLA
@@ -61,3 +63,4 @@ int GetFileLength(const char *filename);
char *Alloc(int size);
void Free(void *ptr);
#endif // SPEECH_H
+26 -22
View File
@@ -24,6 +24,8 @@
/* This is the header file for the library version of espeak */
/* */
/*************************************************************/
#define ESPEAK_API __declspec(dllexport)
#include <stdio.h>
#include <stddef.h>
@@ -157,6 +159,8 @@ typedef enum {
EE_NOT_FOUND=2
} espeak_ERROR;
#define espeakINITIALIZE_PHONEME_EVENTS 0x0001
#define espeakINITIALIZE_DONT_EXIT 0x8000
#ifdef __cplusplus
extern "C"
@@ -169,8 +173,8 @@ int espeak_Initialize(espeak_AUDIO_OUTPUT output, int buflength, const char *pat
path: The directory which contains the espeak-data directory, or NULL for the default location.
options: bit 0: 1=allow espeakEVENT_PHONEME events.
options: bit 0: 1=allow espeakEVENT_PHONEME events.
bit 15: 1=don't exit if espeak_data is not found (used for --help)
Returns: sample rate in Hz, or -1 (EE_INTERNAL_ERROR).
*/
@@ -180,7 +184,7 @@ typedef int (t_espeak_callback)(short*, int, espeak_EVENT*);
#ifdef __cplusplus
extern "C"
#endif
void espeak_SetSynthCallback(t_espeak_callback* SynthCallback);
ESPEAK_API void espeak_SetSynthCallback(t_espeak_callback* SynthCallback);
/* Must be called before any synthesis functions are called.
This specifies a function in the calling program which is called when a buffer of
speech sound data has been produced.
@@ -208,7 +212,7 @@ int SynthCallback(short *wav, int numsamples, espeak_EVENT *events);
#ifdef __cplusplus
extern "C"
#endif
void espeak_SetUriCallback(int (*UriCallback)(int, const char*, const char*));
ESPEAK_API void espeak_SetUriCallback(int (*UriCallback)(int, const char*, const char*));
/* This function may be called before synthesis functions are used, in order to deal with
<audio> tags. It specifies a callback function which is called when an <audio> element is
encountered and allows the calling program to indicate whether the sound file which
@@ -249,7 +253,7 @@ int UriCallback(int type, const char *uri, const char *base);
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_Synth(const void *text,
ESPEAK_API espeak_ERROR espeak_Synth(const void *text,
size_t size,
unsigned int position,
espeak_POSITION_TYPE position_type,
@@ -305,7 +309,7 @@ espeak_ERROR espeak_Synth(const void *text,
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_Synth_Mark(const void *text,
ESPEAK_API espeak_ERROR espeak_Synth_Mark(const void *text,
size_t size,
const char *index_mark,
unsigned int end_position,
@@ -329,7 +333,7 @@ espeak_ERROR espeak_Synth_Mark(const void *text,
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_Key(const char *key_name);
ESPEAK_API espeak_ERROR espeak_Key(const char *key_name);
/* Speak the name of a keyboard key.
If key_name is a single character, it speaks the name of the character.
Otherwise, it speaks key_name as a text string.
@@ -343,7 +347,7 @@ espeak_ERROR espeak_Key(const char *key_name);
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_Char(wchar_t character);
ESPEAK_API espeak_ERROR espeak_Char(wchar_t character);
/* Speak the name of the given character
Return: EE_OK: operation achieved
@@ -425,7 +429,7 @@ espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int rela
#ifdef __cplusplus
extern "C"
#endif
int espeak_GetParameter(espeak_PARAMETER parameter, int current);
ESPEAK_API int espeak_GetParameter(espeak_PARAMETER parameter, int current);
/* current=0 Returns the default value of the specified parameter.
current=1 Returns the current value of the specified parameter, as set by SetParameter()
*/
@@ -433,7 +437,7 @@ int espeak_GetParameter(espeak_PARAMETER parameter, int current);
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist);
ESPEAK_API espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist);
/* Specified a list of punctuation characters whose names are to be spoken when the
value of the Punctuation parameter is set to "some".
@@ -448,7 +452,7 @@ espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist);
#ifdef __cplusplus
extern "C"
#endif
void espeak_SetPhonemeTrace(int value, FILE *stream);
ESPEAK_API void espeak_SetPhonemeTrace(int value, FILE *stream);
/* Controls the output of phoneme symbols for the text
value=0 No phoneme output (default)
value=1 Output the translated phoneme symbols for the text
@@ -461,7 +465,7 @@ void espeak_SetPhonemeTrace(int value, FILE *stream);
#ifdef __cplusplus
extern "C"
#endif
void espeak_CompileDictionary(const char *path, FILE *log, int flags);
ESPEAK_API void espeak_CompileDictionary(const char *path, FILE *log, int flags);
/* Compile pronunciation dictionary for a language which corresponds to the currently
selected voice. The required voice should be selected before calling this function.
@@ -514,7 +518,7 @@ typedef struct {
#ifdef __cplusplus
extern "C"
#endif
const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec);
ESPEAK_API const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec);
/* Reads the voice files from espeak-data/voices and creates an array of espeak_VOICE pointers.
The list is terminated by a NULL pointer
@@ -526,7 +530,7 @@ const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec);
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_SetVoiceByName(const char *name);
ESPEAK_API espeak_ERROR espeak_SetVoiceByName(const char *name);
/* Searches for a voice with a matching "name" field. Language is not considered.
"name" is a UTF8 string.
@@ -539,7 +543,7 @@ espeak_ERROR espeak_SetVoiceByName(const char *name);
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_spec);
ESPEAK_API espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_spec);
/* An espeak_VOICE structure is used to pass criteria to select a voice. Any of the following
fields may be set:
@@ -559,7 +563,7 @@ espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_spec);
#ifdef __cplusplus
extern "C"
#endif
espeak_VOICE *espeak_GetCurrentVoice(void);
ESPEAK_API espeak_VOICE *espeak_GetCurrentVoice(void);
/* Returns the espeak_VOICE data for the currently selected voice.
This is not affected by temporary voice changes caused by SSML elements such as <voice> and <s>
*/
@@ -567,7 +571,7 @@ espeak_VOICE *espeak_GetCurrentVoice(void);
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_Cancel(void);
ESPEAK_API espeak_ERROR espeak_Cancel(void);
/* Stop immediately synthesis and audio output of the current text. When this
function returns, the audio output is fully stopped and the synthesizer is ready to
synthesize a new message.
@@ -580,14 +584,14 @@ espeak_ERROR espeak_Cancel(void);
#ifdef __cplusplus
extern "C"
#endif
int espeak_IsPlaying(void);
ESPEAK_API int espeak_IsPlaying(void);
/* Returns 1 if audio is played, 0 otherwise.
*/
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_Synchronize(void);
ESPEAK_API espeak_ERROR espeak_Synchronize(void);
/* This function returns when all data have been spoken.
Return: EE_OK: operation achieved
EE_INTERNAL_ERROR.
@@ -596,7 +600,7 @@ espeak_ERROR espeak_Synchronize(void);
#ifdef __cplusplus
extern "C"
#endif
espeak_ERROR espeak_Terminate(void);
ESPEAK_API espeak_ERROR espeak_Terminate(void);
/* last function to be called.
Return: EE_OK: operation achieved
EE_INTERNAL_ERROR.
@@ -606,8 +610,8 @@ espeak_ERROR espeak_Terminate(void);
#ifdef __cplusplus
extern "C"
#endif
const char *espeak_Info(void* ptr);
ESPEAK_API const char *espeak_Info(const char **path_data);
/* Returns the version number string.
The parameter is for future use, and should be set to NULL
path_data returns the path to espeak_data
*/
#endif
@@ -20,6 +20,10 @@
// Windows command-line version of eSpeak
#ifndef SPEECH_H
#define SPEECH_H
// conditional compilation options
@@ -62,3 +66,4 @@ int GetFileLength(const char *filename);
char *Alloc(int size);
void Free(void *ptr);
#endif // SPEECH_H
+5 -1
View File
@@ -20,6 +20,10 @@
// speech.h file for the Windows SAPI5 version of eSpeak
#ifndef SPEECH_H
#define SPEECH_H
// conditional compilation options
@@ -29,7 +33,6 @@
#define NEED_GETOPT
#define NO_VARIADIC_MACROS
#define USE_MBROLA_LIB
#define ESPEAK_API
#define PATHSEP '\\'
//#define PLATFORM_POSIX
@@ -65,3 +68,4 @@ int GetFileLength(const char *filename);
char *Alloc(int size);
void Free(void *ptr);
#endif // SPEECH_H