@@ -28,6 +28,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include "mbrola.h" | |||
#include "error.h" | |||
#include "phoneme.h" | |||
#include "speech.h" |
@@ -0,0 +1,66 @@ | |||
/* | |||
* Copyright (C) 2005 to 2015 by Jonathan Duddington | |||
* email: [email protected] | |||
* Copyright (C) 2015-2018 Reece H. Dunn | |||
* Copyright (C) 2018 Juho Hiltunen | |||
* | |||
* 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: <http://www.gnu.org/licenses/>. | |||
*/ | |||
// declarations for compilembrola.c and synth_mbrola.c | |||
#ifndef ESPEAK_NG_MBROLA_H | |||
#define ESPEAK_NG_MBROLA_H | |||
#include <stdbool.h> | |||
#include "synthesize.h" | |||
#ifdef __cplusplus | |||
extern "C" | |||
{ | |||
#endif | |||
typedef struct { | |||
int name; | |||
unsigned int next_phoneme; | |||
int mbr_name; | |||
int mbr_name2; | |||
int percent; // percentage length of first component | |||
int control; | |||
} MBROLA_TAB; | |||
extern int mbrola_delay; | |||
extern char mbrola_name[20]; | |||
espeak_ng_STATUS LoadMbrolaTable(const char *mbrola_voice, | |||
const char *phtrans, | |||
int *srate); | |||
int MbrolaGenerate(PHONEME_LIST *phoneme_list, | |||
int *n_ph, bool resume); | |||
int MbrolaFill(int length, | |||
bool resume, | |||
int amplitude); | |||
void MbrolaReset(void); | |||
int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, bool resume, FILE *f_mbrola); | |||
#ifdef __cplusplus | |||
} | |||
#endif | |||
#endif | |||
@@ -49,6 +49,7 @@ | |||
#include <espeak-ng/encoding.h> | |||
#include "dictionary.h" | |||
#include "mbrola.h" | |||
#include "readclause.h" | |||
#include "synthdata.h" | |||
#include "wavegen.h" |
@@ -22,6 +22,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include "mbrola.h" | |||
#ifdef __cplusplus | |||
extern "C" | |||
{ |
@@ -33,19 +33,24 @@ | |||
#include <espeak-ng/encoding.h> | |||
#include "dictionary.h" | |||
#include "mbrola.h" | |||
#include "readclause.h" | |||
#include "synthdata.h" | |||
#include "wavegen.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "voice.h" | |||
#include "synthesize.h" | |||
#include "translate.h" | |||
// included here so tests can find these even without OPT_MBROLA set | |||
int mbrola_delay; | |||
char mbrola_name[20]; | |||
#ifdef INCLUDE_MBROLA | |||
extern int Read4Bytes(FILE *f); | |||
extern unsigned char *outbuf; | |||
#if defined(_WIN32) || defined(_WIN64) |
@@ -34,6 +34,7 @@ | |||
#include "dictionary.h" | |||
#include "intonation.h" | |||
#include "mbrola.h" | |||
#include "setlengths.h" | |||
#include "synthdata.h" | |||
#include "wavegen.h" | |||
@@ -50,9 +51,6 @@ static void SmoothSpect(void); | |||
int n_phoneme_list = 0; | |||
PHONEME_LIST phoneme_list[N_PHONEME_LIST+1]; | |||
int mbrola_delay; | |||
char mbrola_name[20]; | |||
SPEED_FACTORS speed; | |||
static int last_pitch_cmd; |
@@ -338,15 +338,6 @@ typedef struct { | |||
char *filename; | |||
} SOUND_ICON; | |||
typedef struct { | |||
int name; | |||
unsigned int next_phoneme; | |||
int mbr_name; | |||
int mbr_name2; | |||
int percent; // percentage length of first component | |||
int control; | |||
} MBROLA_TAB; | |||
typedef struct { | |||
int pause_factor; | |||
int clause_pause_factor; | |||
@@ -464,9 +455,6 @@ extern int echo_tail; | |||
extern int echo_amp; | |||
extern short echo_buf[N_ECHO_BUF]; | |||
extern int mbrola_delay; | |||
extern char mbrola_name[20]; | |||
void SynthesizeInit(void); | |||
int Generate(PHONEME_LIST *phoneme_list, int *n_ph, bool resume); | |||
void MakeWave2(PHONEME_LIST *p, int n_ph); | |||
@@ -506,12 +494,7 @@ extern double sonicSpeed; | |||
extern int n_soundicon_tab; | |||
extern SOUND_ICON soundicon_tab[N_SOUNDICON_TAB]; | |||
espeak_ng_STATUS LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int *srate); | |||
espeak_ng_STATUS SetParameter(int parameter, int value, int relative); | |||
int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, bool resume, FILE *f_mbrola); | |||
int MbrolaGenerate(PHONEME_LIST *phoneme_list, int *n_ph, bool resume); | |||
int MbrolaFill(int length, bool resume, int amplitude); | |||
void MbrolaReset(void); | |||
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); |