| #include "error.h" | #include "error.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "spect.h" | #include "spect.h" | ||||
| typedef struct { | typedef struct { |
| #include "error.h" | #include "error.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| #include "translate.h" | #include "translate.h" | ||||
| #include "error.h" | #include "error.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| static const char *basename(const char *filename) | static const char *basename(const char *filename) |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| #include "translate.h" | #include "translate.h" | ||||
| #include "error.h" | #include "error.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| espeak_ng_STATUS | espeak_ng_STATUS |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| #include "translate.h" | #include "translate.h" | ||||
| #include "event.h" | #include "event.h" |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "translate.h" | #include "translate.h" | ||||
| /* Note this module is mostly old code that needs to be rewritten to | /* Note this module is mostly old code that needs to be rewritten to |
| #include "speech.h" | #include "speech.h" | ||||
| #include "klatt.h" | #include "klatt.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| extern unsigned char *out_ptr; | extern unsigned char *out_ptr; | ||||
| extern unsigned char *out_start; | extern unsigned char *out_start; |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "translate.h" | #include "translate.h" | ||||
| #define M_LIGATURE 0x8000 | #define M_LIGATURE 0x8000 |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| #include "translate.h" | #include "translate.h" | ||||
| #include "error.h" | #include "error.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "translate.h" | #include "translate.h" | ||||
| #define N_XML_BUF 500 | #define N_XML_BUF 500 |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "translate.h" | #include "translate.h" | ||||
| extern int GetAmplitude(void); | |||||
| extern void DoSonicSpeed(int value); | extern void DoSonicSpeed(int value); | ||||
| extern int saved_parameters[]; | extern int saved_parameters[]; | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "spect.h" | #include "spect.h" | ||||
| extern double ConvertFromIeeeExtended(unsigned char *bytes); | extern double ConvertFromIeeeExtended(unsigned char *bytes); | ||||
| extern int PeaksToHarmspect(wavegen_peaks_t *peaks, int pitch, int *htab, int control); | |||||
| extern unsigned char pk_shape1[]; | extern unsigned char pk_shape1[]; | ||||
| extern int pk_select; | extern int pk_select; |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "translate.h" | #include "translate.h" | ||||
| #include "espeak_command.h" | #include "espeak_command.h" | ||||
| #include "fifo.h" | #include "fifo.h" |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| #include "translate.h" | #include "translate.h" | ||||
| #include "voice.h" | |||||
| #ifdef INCLUDE_MBROLA | #ifdef INCLUDE_MBROLA | ||||
| extern int Read4Bytes(FILE *f); | extern int Read4Bytes(FILE *f); | ||||
| extern void SetPitch2(voice_t *voice, int pitch1, int pitch2, int *pitch_base, int *pitch_range); | |||||
| extern unsigned char *outbuf; | extern unsigned char *outbuf; | ||||
| #if defined(_WIN32) || defined(_WIN64) | #if defined(_WIN32) || defined(_WIN64) |
| #include "error.h" | #include "error.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "translate.h" | #include "translate.h" | ||||
| const char *version_string = PACKAGE_VERSION; | const char *version_string = PACKAGE_VERSION; |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "translate.h" | #include "translate.h" | ||||
| extern FILE *f_log; | extern FILE *f_log; |
| extern int embedded_value[N_EMBEDDED_VALUES]; | extern int embedded_value[N_EMBEDDED_VALUES]; | ||||
| extern int embedded_default[N_EMBEDDED_VALUES]; | extern int embedded_default[N_EMBEDDED_VALUES]; | ||||
| #define N_PEAKS 9 | |||||
| #define N_PEAKS2 9 // plus Notch and Fill (not yet implemented) | #define N_PEAKS2 9 // plus Notch and Fill (not yet implemented) | ||||
| #define N_MARKERS 8 | #define N_MARKERS 8 | ||||
| extern int wcmdq_tail; | extern int wcmdq_tail; | ||||
| // from Wavegen file | // from Wavegen file | ||||
| int WcmdqFree(); | |||||
| void WcmdqStop(); | |||||
| int WcmdqUsed(); | |||||
| void WcmdqInc(); | |||||
| int WcmdqFree(void); | |||||
| void WcmdqStop(void); | |||||
| int WcmdqUsed(void); | |||||
| void WcmdqInc(void); | |||||
| void WavegenInit(int rate, int wavemult_fact); | void WavegenInit(int rate, int wavemult_fact); | ||||
| float polint(float xa[], float ya[], int n, float x); | float polint(float xa[], float ya[], int n, float x); | ||||
| int WavegenFill(); | |||||
| int WavegenFill(void); | |||||
| void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *out_ptr); | void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *out_ptr); | ||||
| int GetAmplitude(void); | |||||
| void SetPitch2(voice_t *voice, int pitch1, int pitch2, int *pitch_base, int *pitch_range); | |||||
| int PeaksToHarmspect(wavegen_peaks_t *peaks, int pitch, int *htab, int control); | |||||
| extern unsigned char *wavefile_data; | extern unsigned char *wavefile_data; | ||||
| extern int samplerate; | extern int samplerate; |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| #include "translate.h" | #include "translate.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "translate.h" | #include "translate.h" | ||||
| Translator *translator = NULL; // the main translator | Translator *translator = NULL; // the main translator |
| { | { | ||||
| #endif | #endif | ||||
| #define N_PEAKS 9 | |||||
| typedef struct { | typedef struct { | ||||
| char v_name[40]; | char v_name[40]; | ||||
| char language_name[20]; | char language_name[20]; |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #include "translate.h" | #include "translate.h" | ||||
| MNEM_TAB genders[] = { | MNEM_TAB genders[] = { |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "synthesize.h" | |||||
| #include "voice.h" | #include "voice.h" | ||||
| #include "synthesize.h" | |||||
| #if HAVE_SONIC_H | #if HAVE_SONIC_H | ||||
| #include "sonic.h" | #include "sonic.h" | ||||
| return value; | return value; | ||||
| } | } | ||||
| int Wavegen() | |||||
| static int Wavegen() | |||||
| { | { | ||||
| if (wvoice == NULL) | if (wvoice == NULL) | ||||
| return 0; | return 0; | ||||
| *pitch_range = base + (pitch2 * range)/2 - *pitch_base; | *pitch_range = base + (pitch2 * range)/2 - *pitch_base; | ||||
| } | } | ||||
| void SetPitch(int length, unsigned char *env, int pitch1, int pitch2) | |||||
| static void SetPitch(int length, unsigned char *env, int pitch1, int pitch2) | |||||
| { | { | ||||
| if (wvoice == NULL) | if (wvoice == NULL) | ||||
| return; | return; | ||||
| flutter_amp = wvoice->flutter; | flutter_amp = wvoice->flutter; | ||||
| } | } | ||||
| void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v) | |||||
| static void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v) | |||||
| { | { | ||||
| if (wvoice == NULL || v == NULL) | if (wvoice == NULL || v == NULL) | ||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| int WavegenFill2() | |||||
| static int WavegenFill2() | |||||
| { | { | ||||
| // Pick up next wavegen commands from the queue | // Pick up next wavegen commands from the queue | ||||
| // return: 0 output buffer has been filled | // return: 0 output buffer has been filled |
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| #include "translate.h" | #include "translate.h" | ||||
| #include "speech.h" | #include "speech.h" | ||||
| #include "phoneme.h" | #include "phoneme.h" | ||||
| #include "voice.h" | |||||
| #include "synthesize.h" | #include "synthesize.h" | ||||
| #include "translate.h" | #include "translate.h" | ||||