@@ -289,18 +289,6 @@ static TONE_NUCLEUS tone_nucleus_table[N_TONE_NUCLEUS_TABLE] = { | |||
{ PITCHfall, 70, 18, PITCHfall, 70, 24, NULL, 32, 20, 0 }, // 12 test | |||
}; | |||
// index by 0=. 1=, 2=?, 3=! 4=none, 5=emphasized | |||
unsigned char punctuation_to_tone[INTONATION_TYPES][PUNCT_INTONATIONS] = { | |||
{ 0, 1, 2, 3, 0, 4 }, | |||
{ 0, 1, 2, 3, 0, 4 }, | |||
{ 5, 6, 2, 3, 0, 4 }, | |||
{ 5, 7, 1, 3, 0, 4 }, | |||
{ 8, 9, 10, 3, 0, 0 }, | |||
{ 8, 8, 10, 3, 0, 0 }, | |||
{ 11, 11, 11, 11, 0, 0 }, // 6 test | |||
{ 12, 12, 12, 12, 0, 0 } | |||
}; | |||
int n_tunes = 0; | |||
TUNE *tunes = NULL; | |||
@@ -132,24 +132,6 @@ int clause_type_from_codepoint(uint32_t c) | |||
return CLAUSE_NONE; | |||
} | |||
const int param_defaults[N_SPEECH_PARAM] = { | |||
0, // silence (internal use) | |||
175, // rate wpm | |||
100, // volume | |||
50, // pitch | |||
50, // range | |||
0, // punctuation | |||
0, // capital letters | |||
0, // wordgap | |||
0, // options | |||
0, // intonation | |||
0, | |||
0, | |||
0, // emphasis | |||
0, // line length | |||
0, // voice type | |||
}; | |||
int towlower2(unsigned int c) | |||
{ | |||
// check for non-standard upper to lower case conversions |
@@ -33,7 +33,6 @@ typedef struct { | |||
} PARAM_STACK; | |||
extern PARAM_STACK param_stack[]; | |||
extern const int param_defaults[N_SPEECH_PARAM]; | |||
int clause_type_from_codepoint(uint32_t c); | |||
int towlower2(unsigned int c); // Supports Turkish I |
@@ -377,6 +377,7 @@ espeak_ng_STATUS SetParameter(int parameter, int value, int relative) | |||
int new_value = value; | |||
int default_value; | |||
extern const int *param_defaults; | |||
if (relative) { | |||
if (parameter < 5) { |
@@ -30,6 +30,11 @@ extern "C" | |||
void CalcLengths(Translator *tr); | |||
espeak_ng_STATUS SetParameter(int parameter, | |||
int value, | |||
int relative | |||
); | |||
#ifdef __cplusplus | |||
} | |||
#endif |
@@ -333,6 +333,25 @@ ESPEAK_NG_API void espeak_ng_InitializePath(const char *path) | |||
strcpy(path_home, PATH_ESPEAK_DATA); | |||
} | |||
const int param_defaults[N_SPEECH_PARAM] = { | |||
0, // silence (internal use) | |||
175, // rate wpm | |||
100, // volume | |||
50, // pitch | |||
50, // range | |||
0, // punctuation | |||
0, // capital letters | |||
0, // wordgap | |||
0, // options | |||
0, // intonation | |||
0, | |||
0, | |||
0, // emphasis | |||
0, // line length | |||
0, // voice type | |||
}; | |||
ESPEAK_NG_API espeak_ng_STATUS espeak_ng_Initialize(espeak_ng_ERROR_CONTEXT *context) | |||
{ | |||
int param; | |||
@@ -919,6 +938,7 @@ ESPEAK_NG_API espeak_ng_STATUS espeak_ng_Terminate(void) | |||
return ENS_OK; | |||
} | |||
const char *version_string = PACKAGE_VERSION; | |||
ESPEAK_API const char *espeak_Info(const char **ptr) | |||
{ | |||
if (ptr != NULL) |
@@ -35,6 +35,7 @@ | |||
#include "dictionary.h" | |||
#include "mbrola.h" | |||
#include "readclause.h" | |||
#include "setlengths.h" | |||
#include "synthdata.h" | |||
#include "wavegen.h" | |||
@@ -41,7 +41,6 @@ | |||
#include "synthesize.h" | |||
#include "translate.h" | |||
const char *version_string = PACKAGE_VERSION; | |||
const int version_phdata = 0x014801; | |||
// copy the current phoneme table into here |
@@ -480,7 +480,6 @@ extern unsigned char *out_start; | |||
extern unsigned char *out_end; | |||
extern espeak_EVENT *event_list; | |||
extern t_espeak_callback *synth_callback; | |||
extern const char *version_string; | |||
extern const int version_phdata; | |||
#define N_SOUNDICON_TAB 80 // total entries in soundicon_tab | |||
@@ -488,7 +487,6 @@ extern const int version_phdata; | |||
extern int n_soundicon_tab; | |||
extern SOUND_ICON soundicon_tab[N_SOUNDICON_TAB]; | |||
espeak_ng_STATUS SetParameter(int parameter, int value, int relative); | |||
void DoEmbedded(int *embix, int sourceix); | |||
void DoMarker(int type, int char_posn, int length, int value); | |||
void DoPhonemeMarker(int type, int char_posn, int length, char *name); |
@@ -294,6 +294,18 @@ static Translator *NewTranslator(void) | |||
tr->langopts.break_numbers = BREAK_THOUSANDS; // 1000, 1000,000 1,000,000 etc | |||
tr->langopts.max_digits = 14; | |||
// index by 0=. 1=, 2=?, 3=! 4=none, 5=emphasized | |||
unsigned char punctuation_to_tone[INTONATION_TYPES][PUNCT_INTONATIONS] = { | |||
{ 0, 1, 2, 3, 0, 4 }, | |||
{ 0, 1, 2, 3, 0, 4 }, | |||
{ 5, 6, 2, 3, 0, 4 }, | |||
{ 5, 7, 1, 3, 0, 4 }, | |||
{ 8, 9, 10, 3, 0, 0 }, | |||
{ 8, 8, 10, 3, 0, 0 }, | |||
{ 11, 11, 11, 11, 0, 0 }, // 6 test | |||
{ 12, 12, 12, 12, 0, 0 } | |||
}; | |||
memcpy(tr->punct_to_tone, punctuation_to_tone, sizeof(tr->punct_to_tone)); | |||
memcpy(tr->langopts.tunes, default_tunes, sizeof(tr->langopts.tunes)); |
@@ -669,7 +669,6 @@ extern char skip_marker[N_MARKER_LENGTH]; | |||
#define N_PUNCTLIST 60 | |||
extern wchar_t option_punctlist[N_PUNCTLIST]; // which punctuation characters to announce | |||
extern unsigned char punctuation_to_tone[INTONATION_TYPES][PUNCT_INTONATIONS]; | |||
extern Translator *translator; | |||
extern Translator *translator2; |