| 1 |
/* |
| 2 |
* Copyright (C) 2005 to 2015 by Jonathan Duddington |
| 3 |
* email: [email protected] |
| 4 |
* Copyright (C) 2015-2018 Reece H. Dunn |
| 5 |
* Copyright (C) 2018 Juho Hiltunen |
| 6 |
* |
| 7 |
* This program is free software; you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published by |
| 9 |
* the Free Software Foundation; either version 3 of the License, or |
| 10 |
* (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this program; if not, see: <http://www.gnu.org/licenses/>. |
| 19 |
*/ |
| 20 |
|
| 21 |
// declarations for compilembrola.c and synth_mbrola.c |
| 22 |
|
| 23 |
#ifndef ESPEAK_NG_MBROLA_H |
| 24 |
#define ESPEAK_NG_MBROLA_H |
| 25 |
|
| 26 |
#include <stdbool.h> |
| 27 |
|
| 28 |
#include "synthesize.h" |
| 29 |
|
| 30 |
#ifdef __cplusplus |
| 31 |
extern "C" |
| 32 |
{ |
| 33 |
#endif |
| 34 |
|
| 35 |
typedef struct { |
| 36 |
int name; |
| 37 |
unsigned int next_phoneme; |
| 38 |
int mbr_name; |
| 39 |
int mbr_name2; |
| 40 |
int percent; // percentage length of first component |
| 41 |
int control; |
| 42 |
} MBROLA_TAB; |
| 43 |
|
| 44 |
extern int mbrola_delay; |
| 45 |
extern char mbrola_name[20]; |
| 46 |
|
| 47 |
espeak_ng_STATUS LoadMbrolaTable(const char *mbrola_voice, |
| 48 |
const char *phtrans, |
| 49 |
int *srate); |
| 50 |
|
| 51 |
int MbrolaGenerate(PHONEME_LIST *phoneme_list, |
| 52 |
int *n_ph, bool resume); |
| 53 |
|
| 54 |
int MbrolaFill(int length, |
| 55 |
bool resume, |
| 56 |
int amplitude); |
| 57 |
|
| 58 |
void MbrolaReset(void); |
| 59 |
int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, bool resume, FILE *f_mbrola); |
| 60 |
|
| 61 |
#ifdef __cplusplus |
| 62 |
} |
| 63 |
#endif |
| 64 |
|
| 65 |
#endif |
| 66 |
|