diff --git a/.gitignore b/.gitignore index fe608938..b33621d6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ # libraries +docs/speak_lib.h + src/libespeak.a src/libespeak.so* diff --git a/Makefile b/Makefile index 04120919..0ad3ae33 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ PLATFORM=big_endian ##### standard build actions: -all: src/speak src/libespeak.so src/libespeak.a src/espeak src/espeakedit espeak-data/phontab dictionaries +all: src/speak src/libespeak.so src/libespeak.a src/espeak src/espeakedit espeak-data/phontab dictionaries docs/speak_lib.h install: all cd src && make DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) install && cd .. @@ -69,6 +69,9 @@ espeakedit_SOURCES = \ src/voicedlg.cpp \ src/vowelchart.cpp +docs/speak_lib.h: src/speak_lib.h + cp $< $@ + src/libespeak.a: $(common_SOURCES) $(libespeak_SOURCES) cd src && make libespeak.a PREFIX=$(PREFIX) && cd .. diff --git a/docs/speak_lib.h b/docs/speak_lib.h deleted file mode 100644 index 9ca01f59..00000000 --- a/docs/speak_lib.h +++ /dev/null @@ -1,613 +0,0 @@ -#ifndef SPEAK_LIB_H -#define SPEAK_LIB_H -/*************************************************************************** - * Copyright (C) 2005 to 2010 by Jonathan Duddington * - * email: jonsd@users.sourceforge.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, see: * - * . * - ***************************************************************************/ - - -/*************************************************************/ -/* This is the header file for the library version of espeak */ -/* */ -/*************************************************************/ - -#include -#include - -#define ESPEAK_API_REVISION 6 -/* -Revision 2 - Added parameter "options" to eSpeakInitialize() - -Revision 3 - Added espeakWORDGAP to espeak_PARAMETER - -Revision 4 - Added flags parameter to espeak_CompileDictionary() - -Revision 5 - Added espeakCHARS_16BIT - -Revision 6 - Added macros: espeakRATE_MINIMUM, espeakRATE_MAXIMUM, espeakRATE_NORMAL -*/ - /********************/ - /* Initialization */ - /********************/ - -// values for 'value' in espeak_SetParameter(espeakRATE, value, 0), nominally in words-per-minute -#define espeakRATE_MINIMUM 80 -#define espeakRATE_MAXIMUM 450 -#define espeakRATE_NORMAL 175 - - -typedef enum { - espeakEVENT_LIST_TERMINATED = 0, // Retrieval mode: terminates the event list. - espeakEVENT_WORD = 1, // Start of word - espeakEVENT_SENTENCE = 2, // Start of sentence - espeakEVENT_MARK = 3, // Mark - espeakEVENT_PLAY = 4, // Audio element - espeakEVENT_END = 5, // End of sentence or clause - espeakEVENT_MSG_TERMINATED = 6, // End of message - espeakEVENT_PHONEME = 7, // Phoneme, if enabled in espeak_Initialize() - espeakEVENT_SAMPLERATE = 8 // internal use, set sample rate -} espeak_EVENT_TYPE; - - - -typedef struct { - espeak_EVENT_TYPE type; - unsigned int unique_identifier; // message identifier (or 0 for key or character) - int text_position; // the number of characters from the start of the text - int length; // word length, in characters (for espeakEVENT_WORD) - int audio_position; // the time in mS within the generated speech output data - int sample; // sample id (internal use) - void* user_data; // pointer supplied by the calling program - union { - int number; // used for WORD and SENTENCE events. For PHONEME events this is the phoneme mnemonic. - const char *name; // used for MARK and PLAY events. UTF8 string - } id; -} espeak_EVENT; -/* - When a message is supplied to espeak_synth, the request is buffered and espeak_synth returns. When the message is really processed, the callback function will be repetedly called. - - - In RETRIEVAL mode, the callback function supplies to the calling program the audio data and an event list terminated by 0 (LIST_TERMINATED). - - In PLAYBACK mode, the callback function is called as soon as an event happens. - - For example suppose that the following message is supplied to espeak_Synth: - "hello, hello." - - - * Once processed in RETRIEVAL mode, it could lead to 3 calls of the callback function : - - ** Block 1: -