eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

synth_mbrola.c 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. /*
  2. * Copyright (C) 2005 to 2013 by Jonathan Duddington
  3. * email: [email protected]
  4. * Copyright (C) 2015-2016 Reece H. Dunn
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, see: <http://www.gnu.org/licenses/>.
  18. */
  19. #include "config.h"
  20. #include <errno.h>
  21. #include <stdio.h>
  22. #include <ctype.h>
  23. #include <wctype.h>
  24. #include <stdlib.h>
  25. #include <string.h>
  26. #include <math.h>
  27. #if HAVE_STDINT_H
  28. #include <stdint.h>
  29. #endif
  30. #include <espeak-ng/espeak_ng.h>
  31. #include <espeak/speak_lib.h>
  32. #include "speech.h"
  33. #include "phoneme.h"
  34. #include "synthesize.h"
  35. #include "translate.h"
  36. #include "voice.h"
  37. #ifdef INCLUDE_MBROLA
  38. extern int Read4Bytes(FILE *f);
  39. extern void SetPitch2(voice_t *voice, int pitch1, int pitch2, int *pitch_base, int *pitch_range);
  40. extern unsigned char *outbuf;
  41. #ifndef PLATFORM_WINDOWS
  42. #include "mbrowrap.h"
  43. #else
  44. #include <windows.h>
  45. typedef void (WINAPI *PROCVV)(void);
  46. typedef void (WINAPI *PROCVI)(int);
  47. typedef void (WINAPI *PROCVF)(float);
  48. typedef int (WINAPI *PROCIV)();
  49. typedef int (WINAPI *PROCIC)(char *);
  50. typedef int (WINAPI *PROCISI)(short *, int);
  51. typedef char * (WINAPI *PROCVCI)(char *, int);
  52. PROCIC init_MBR;
  53. PROCIC write_MBR;
  54. PROCIV flush_MBR;
  55. PROCISI read_MBR;
  56. PROCVV close_MBR;
  57. PROCVV reset_MBR;
  58. PROCIV lastError_MBR;
  59. PROCVCI lastErrorStr_MBR;
  60. PROCVI setNoError_MBR;
  61. PROCIV getFreq_MBR;
  62. PROCVF setVolumeRatio_MBR;
  63. HINSTANCE hinstDllMBR = NULL;
  64. BOOL load_MBR()
  65. {
  66. if (hinstDllMBR != NULL)
  67. return TRUE; // already loaded
  68. if ((hinstDllMBR = LoadLibraryA("mbrola.dll")) == 0)
  69. return FALSE;
  70. init_MBR = (PROCIC)GetProcAddress(hinstDllMBR, "init_MBR");
  71. write_MBR = (PROCIC)GetProcAddress(hinstDllMBR, "write_MBR");
  72. flush_MBR = (PROCIV)GetProcAddress(hinstDllMBR, "flush_MBR");
  73. read_MBR = (PROCISI)GetProcAddress(hinstDllMBR, "read_MBR");
  74. close_MBR = (PROCVV)GetProcAddress(hinstDllMBR, "close_MBR");
  75. reset_MBR = (PROCVV)GetProcAddress(hinstDllMBR, "reset_MBR");
  76. lastError_MBR = (PROCIV)GetProcAddress(hinstDllMBR, "lastError_MBR");
  77. lastErrorStr_MBR = (PROCVCI)GetProcAddress(hinstDllMBR, "lastErrorStr_MBR");
  78. setNoError_MBR = (PROCVI)GetProcAddress(hinstDllMBR, "setNoError_MBR");
  79. setVolumeRatio_MBR = (PROCVF)GetProcAddress(hinstDllMBR, "setVolumeRatio_MBR");
  80. return TRUE;
  81. }
  82. void unload_MBR()
  83. {
  84. if (hinstDllMBR) {
  85. FreeLibrary(hinstDllMBR);
  86. hinstDllMBR = NULL;
  87. }
  88. }
  89. #endif // windows
  90. static MBROLA_TAB *mbrola_tab = NULL;
  91. static int mbrola_control = 0;
  92. static int mbr_name_prefix = 0;
  93. espeak_ng_STATUS LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int *srate)
  94. {
  95. // Load a phoneme name translation table from espeak-data/mbrola
  96. int size;
  97. int ix;
  98. int *pw;
  99. FILE *f_in;
  100. char path[sizeof(path_home)+15];
  101. mbrola_name[0] = 0;
  102. mbrola_delay = 0;
  103. mbr_name_prefix = 0;
  104. if (mbrola_voice == NULL) {
  105. samplerate = samplerate_native;
  106. SetParameter(espeakVOICETYPE, 0, 0);
  107. return ENS_OK;
  108. }
  109. sprintf(path, "%s/mbrola/%s", path_home, mbrola_voice);
  110. #ifdef PLATFORM_POSIX
  111. // if not found, then also look in
  112. // usr/share/mbrola/xx, /usr/share/mbrola/xx/xx, /usr/share/mbrola/voices/xx
  113. if (GetFileLength(path) <= 0) {
  114. sprintf(path, "/usr/share/mbrola/%s", mbrola_voice);
  115. if (GetFileLength(path) <= 0) {
  116. sprintf(path, "/usr/share/mbrola/%s/%s", mbrola_voice, mbrola_voice);
  117. if (GetFileLength(path) <= 0)
  118. sprintf(path, "/usr/share/mbrola/voices/%s", mbrola_voice);
  119. }
  120. }
  121. close_MBR();
  122. #endif
  123. #ifdef PLATFORM_WINDOWS
  124. if (load_MBR() == FALSE) { // load mbrola.dll
  125. fprintf(stderr, "Can't load mbrola.dll\n");
  126. return ENS_MBROLA_NOT_FOUND;
  127. }
  128. #endif
  129. if (init_MBR(path) != 0) // initialise the required mbrola voice
  130. return ENS_MBROLA_VOICE_NOT_FOUND;
  131. setNoError_MBR(1); // don't stop on phoneme errors
  132. // read eSpeak's mbrola phoneme translation data, eg. en1_phtrans
  133. sprintf(path, "%s/mbrola_ph/%s", path_home, phtrans);
  134. size = GetFileLength(path);
  135. if ((f_in = fopen(path, "rb")) == NULL) {
  136. int error = errno;
  137. close_MBR();
  138. return error;
  139. }
  140. if ((mbrola_tab = (MBROLA_TAB *)realloc(mbrola_tab, size)) == NULL) {
  141. fclose(f_in);
  142. close_MBR();
  143. return ENOMEM;
  144. }
  145. mbrola_control = Read4Bytes(f_in);
  146. pw = (int *)mbrola_tab;
  147. for (ix = 4; ix < size; ix += 4)
  148. *pw++ = Read4Bytes(f_in);
  149. size = fread(mbrola_tab, 1, size, f_in);
  150. fclose(f_in);
  151. setVolumeRatio_MBR((float)(mbrola_control & 0xff) /16.0f);
  152. samplerate = *srate = getFreq_MBR();
  153. if (*srate == 22050)
  154. SetParameter(espeakVOICETYPE, 0, 0);
  155. else
  156. SetParameter(espeakVOICETYPE, 1, 0);
  157. strcpy(mbrola_name, mbrola_voice);
  158. mbrola_delay = 1000; // improve synchronization of events
  159. return ENS_OK;
  160. }
  161. static int GetMbrName(PHONEME_LIST *plist, PHONEME_TAB *ph, PHONEME_TAB *ph_prev, PHONEME_TAB *ph_next, int *name2, int *split, int *control)
  162. {
  163. // Look up a phoneme in the mbrola phoneme name translation table
  164. // It may give none, 1, or 2 mbrola phonemes
  165. MBROLA_TAB *pr;
  166. PHONEME_TAB *other_ph;
  167. int found = 0;
  168. static int mnem;
  169. // control
  170. // bit 0 skip the next phoneme
  171. // bit 1 match this and Previous phoneme
  172. // bit 2 only at the start of a word
  173. // bit 3 don't match two phonemes across a word boundary
  174. // bit 4 add this phoneme name as a prefix to the next phoneme name (used for de4 phoneme prefix '?')
  175. // bit 5 only in stressed syllable
  176. // bit 6 only at the end of a word
  177. *name2 = 0;
  178. *split = 0;
  179. *control = 0;
  180. mnem = ph->mnemonic;
  181. pr = mbrola_tab;
  182. while (pr->name != 0) {
  183. if (mnem == pr->name) {
  184. if (pr->next_phoneme == 0)
  185. found = 1;
  186. else if ((pr->next_phoneme == ':') && (plist->synthflags & SFLAG_LENGTHEN))
  187. found = 1;
  188. else {
  189. if (pr->control & 2)
  190. other_ph = ph_prev;
  191. else if ((pr->control & 8) && ((plist+1)->newword))
  192. other_ph = phoneme_tab[phPAUSE]; // don't match the next phoneme over a word boundary
  193. else
  194. other_ph = ph_next;
  195. if ((pr->next_phoneme == other_ph->mnemonic) ||
  196. ((pr->next_phoneme == 2) && (other_ph->type == phVOWEL)) ||
  197. ((pr->next_phoneme == '_') && (other_ph->type == phPAUSE)))
  198. found = 1;
  199. }
  200. if ((pr->control & 4) && (plist->newword == 0)) // only at start of word
  201. found = 0;
  202. if ((pr->control & 0x40) && (plist[1].newword == 0)) // only at the end of a word
  203. found = 0;
  204. if ((pr->control & 0x20) && (plist->stresslevel < plist->wordstress))
  205. found = 0; // only in stressed syllables
  206. if (found) {
  207. *name2 = pr->mbr_name2;
  208. *split = pr->percent;
  209. *control = pr->control;
  210. if (pr->control & 0x10) {
  211. mbr_name_prefix = pr->mbr_name;
  212. return 0;
  213. }
  214. mnem = pr->mbr_name;
  215. break;
  216. }
  217. }
  218. pr++;
  219. }
  220. if (mbr_name_prefix != 0)
  221. mnem = (mnem << 8) | (mbr_name_prefix & 0xff);
  222. mbr_name_prefix = 0;
  223. return mnem;
  224. }
  225. static char *WritePitch(int env, int pitch1, int pitch2, int split, int final)
  226. {
  227. // final=1: only give the final pitch value.
  228. int x;
  229. int ix;
  230. int pitch_base;
  231. int pitch_range;
  232. int p1, p2, p_end;
  233. unsigned char *pitch_env;
  234. int max = -1;
  235. int min = 999;
  236. int y_max = 0;
  237. int y_min = 0;
  238. int env100 = 80; // apply the pitch change only over this proportion of the mbrola phoneme(s)
  239. int y2;
  240. int y[4];
  241. int env_split;
  242. char buf[50];
  243. static char output[50];
  244. output[0] = 0;
  245. pitch_env = envelope_data[env];
  246. SetPitch2(voice, pitch1, pitch2, &pitch_base, &pitch_range);
  247. env_split = (split * 128)/100;
  248. if (env_split < 0)
  249. env_split = 0-env_split;
  250. // find max and min in the pitch envelope
  251. for (x = 0; x < 128; x++) {
  252. if (pitch_env[x] > max) {
  253. max = pitch_env[x];
  254. y_max = x;
  255. }
  256. if (pitch_env[x] < min) {
  257. min = pitch_env[x];
  258. y_min = x;
  259. }
  260. }
  261. // set an additional pitch point half way through the phoneme.
  262. // but look for a maximum or a minimum and use that instead
  263. y[2] = 64;
  264. if ((y_max > 0) && (y_max < 127))
  265. y[2] = y_max;
  266. if ((y_min > 0) && (y_min < 127))
  267. y[2] = y_min;
  268. y[1] = y[2] / 2;
  269. y[3] = y[2] + (127 - y[2])/2;
  270. // set initial pitch
  271. p1 = ((pitch_env[0]*pitch_range)>>8) + pitch_base; // Hz << 12
  272. p_end = ((pitch_env[127]*pitch_range)>>8) + pitch_base;
  273. if (split >= 0) {
  274. sprintf(buf, " 0 %d", p1/4096);
  275. strcat(output, buf);
  276. }
  277. // don't use intermediate pitch points for linear rise and fall
  278. if (env > 1) {
  279. for (ix = 1; ix < 4; ix++) {
  280. p2 = ((pitch_env[y[ix]]*pitch_range)>>8) + pitch_base;
  281. if (split > 0)
  282. y2 = (y[ix] * env100)/env_split;
  283. else if (split < 0)
  284. y2 = ((y[ix]-env_split) * env100)/env_split;
  285. else
  286. y2 = (y[ix] * env100)/128;
  287. if ((y2 > 0) && (y2 <= env100)) {
  288. sprintf(buf, " %d %d", y2, p2/4096);
  289. strcat(output, buf);
  290. }
  291. }
  292. }
  293. p_end = p_end/4096;
  294. if (split <= 0) {
  295. sprintf(buf, " %d %d", env100, p_end);
  296. strcat(output, buf);
  297. }
  298. if (env100 < 100) {
  299. sprintf(buf, " %d %d", 100, p_end);
  300. strcat(output, buf);
  301. }
  302. strcat(output, "\n");
  303. if (final)
  304. sprintf(output, "\t100 %d\n", p_end);
  305. return output;
  306. }
  307. int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbrola)
  308. {
  309. // Generate a mbrola pho file
  310. unsigned int name;
  311. int len;
  312. int len1;
  313. PHONEME_TAB *ph;
  314. PHONEME_TAB *ph_next;
  315. PHONEME_TAB *ph_prev;
  316. PHONEME_LIST *p;
  317. PHONEME_LIST *next;
  318. PHONEME_DATA phdata;
  319. FMT_PARAMS fmtp;
  320. int pause = 0;
  321. int released;
  322. int name2;
  323. int control;
  324. int done;
  325. int len_percent;
  326. const char *final_pitch;
  327. char *ptr;
  328. char mbr_buf[120];
  329. static int phix;
  330. static int embedded_ix;
  331. static int word_count;
  332. if (!resume) {
  333. phix = 1;
  334. embedded_ix = 0;
  335. word_count = 0;
  336. }
  337. while (phix < n_phonemes) {
  338. if (WcmdqFree() < MIN_WCMDQ)
  339. return 1;
  340. ptr = mbr_buf;
  341. p = &plist[phix];
  342. next = &plist[phix+1];
  343. ph = p->ph;
  344. ph_prev = plist[phix-1].ph;
  345. ph_next = plist[phix+1].ph;
  346. if (p->synthflags & SFLAG_EMBEDDED)
  347. DoEmbedded(&embedded_ix, p->sourceix);
  348. if (p->newword & 4)
  349. DoMarker(espeakEVENT_SENTENCE, (p->sourceix & 0x7ff) + clause_start_char, 0, count_sentences);
  350. if (p->newword & 1)
  351. DoMarker(espeakEVENT_WORD, (p->sourceix & 0x7ff) + clause_start_char, p->sourceix >> 11, clause_start_word + word_count++);
  352. name = GetMbrName(p, ph, ph_prev, ph_next, &name2, &len_percent, &control);
  353. if (control & 1)
  354. phix++;
  355. if (name == 0) {
  356. phix++;
  357. continue; // ignore this phoneme
  358. }
  359. if ((ph->type == phPAUSE) && (name == ph->mnemonic)) {
  360. // a pause phoneme, which has not been changed by the translation
  361. name = '_';
  362. len = (p->length * speed.pause_factor)/256;
  363. if (len == 0)
  364. len = 1;
  365. } else
  366. len = (80 * speed.wav_factor)/256;
  367. if (ph->code != phonEND_WORD) {
  368. char phoneme_name[16];
  369. WritePhMnemonic(phoneme_name, p->ph, p, option_phoneme_events & espeakINITIALIZE_PHONEME_IPA, NULL);
  370. DoPhonemeMarker(espeakEVENT_PHONEME, (p->sourceix & 0x7ff) + clause_start_char, 0, phoneme_name);
  371. }
  372. ptr += sprintf(ptr, "%s\t", WordToString(name));
  373. if (name2 == '_') {
  374. // add a pause after this phoneme
  375. pause = len_percent;
  376. name2 = 0;
  377. }
  378. done = 0;
  379. final_pitch = "";
  380. switch (ph->type)
  381. {
  382. case phVOWEL:
  383. len = ph->std_length;
  384. if (p->synthflags & SFLAG_LENGTHEN)
  385. len += phoneme_tab[phonLENGTHEN]->std_length; // phoneme was followed by an extra : symbol
  386. if (ph_next->type == phPAUSE)
  387. len += 50; // lengthen vowels before a pause
  388. len = (len * p->length)/256;
  389. if (name2 == 0) {
  390. char *pitch = WritePitch(p->env, p->pitch1, p->pitch2, 0, 0);
  391. ptr += sprintf(ptr, "%d\t%s", len, pitch);
  392. } else {
  393. char *pitch;
  394. pitch = WritePitch(p->env, p->pitch1, p->pitch2, len_percent, 0);
  395. len1 = (len * len_percent)/100;
  396. ptr += sprintf(ptr, "%d\t%s", len1, pitch);
  397. pitch = WritePitch(p->env, p->pitch1, p->pitch2, -len_percent, 0);
  398. ptr += sprintf(ptr, "%s\t%d\t%s", WordToString(name2), len-len1, pitch);
  399. }
  400. done = 1;
  401. break;
  402. case phSTOP:
  403. released = 0;
  404. if (next->type == phVOWEL) released = 1;
  405. if (next->type == phLIQUID && !next->newword) released = 1;
  406. if (released == 0)
  407. p->synthflags |= SFLAG_NEXT_PAUSE;
  408. InterpretPhoneme(NULL, 0, p, &phdata, NULL);
  409. len = DoSample3(&phdata, 0, -1);
  410. len = (len * 1000)/samplerate; // convert to mS
  411. len += PauseLength(p->prepause, 1);
  412. break;
  413. case phVSTOP:
  414. len = (80 * speed.wav_factor)/256;
  415. break;
  416. case phFRICATIVE:
  417. len = 0;
  418. InterpretPhoneme(NULL, 0, p, &phdata, NULL);
  419. if (p->synthflags & SFLAG_LENGTHEN)
  420. len = DoSample3(&phdata, p->length, -1); // play it twice for [s:] etc.
  421. len += DoSample3(&phdata, p->length, -1);
  422. len = (len * 1000)/samplerate; // convert to mS
  423. break;
  424. case phNASAL:
  425. if (next->type != phVOWEL) {
  426. memset(&fmtp, 0, sizeof(fmtp));
  427. InterpretPhoneme(NULL, 0, p, &phdata, NULL);
  428. fmtp.fmt_addr = phdata.sound_addr[pd_FMT];
  429. len = DoSpect2(p->ph, 0, &fmtp, p, -1);
  430. len = (len * 1000)/samplerate;
  431. if (next->type == phPAUSE)
  432. len += 50;
  433. final_pitch = WritePitch(p->env, p->pitch1, p->pitch2, 0, 1);
  434. }
  435. break;
  436. case phLIQUID:
  437. if (next->type == phPAUSE) {
  438. len += 50;
  439. final_pitch = WritePitch(p->env, p->pitch1, p->pitch2, 0, 1);
  440. }
  441. break;
  442. }
  443. if (!done) {
  444. if (name2 != 0) {
  445. len1 = (len * len_percent)/100;
  446. ptr += sprintf(ptr, "%d\n%s\t", len1, WordToString(name2));
  447. len -= len1;
  448. }
  449. ptr += sprintf(ptr, "%d%s\n", len, final_pitch);
  450. }
  451. if (pause) {
  452. len += PauseLength(pause, 0);
  453. ptr += sprintf(ptr, "_ \t%d\n", PauseLength(pause, 0));
  454. pause = 0;
  455. }
  456. if (f_mbrola)
  457. fwrite(mbr_buf, 1, (ptr-mbr_buf), f_mbrola); // write .pho to a file
  458. else {
  459. int res = write_MBR(mbr_buf);
  460. if (res < 0)
  461. return 0; // don't get stuck on error
  462. if (res == 0)
  463. return 1;
  464. wcmdq[wcmdq_tail][0] = WCMD_MBROLA_DATA;
  465. wcmdq[wcmdq_tail][1] = len;
  466. WcmdqInc();
  467. }
  468. phix++;
  469. }
  470. if (!f_mbrola) {
  471. flush_MBR();
  472. // flush the mbrola output buffer
  473. wcmdq[wcmdq_tail][0] = WCMD_MBROLA_DATA;
  474. wcmdq[wcmdq_tail][1] = 500;
  475. WcmdqInc();
  476. }
  477. return 0;
  478. }
  479. int MbrolaGenerate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
  480. {
  481. FILE *f_mbrola = NULL;
  482. if (*n_ph == 0)
  483. return 0;
  484. if (option_phonemes & espeakPHONEMES_MBROLA) {
  485. // send mbrola data to a file, not to the mbrola library
  486. f_mbrola = f_trans;
  487. }
  488. int again = MbrolaTranslate(phoneme_list, *n_ph, resume, f_mbrola);
  489. if (!again)
  490. *n_ph = 0;
  491. return again;
  492. }
  493. int MbrolaFill(int length, int resume, int amplitude)
  494. {
  495. // Read audio data from Mbrola (length is in millisecs)
  496. static int n_samples;
  497. int req_samples, result;
  498. int ix;
  499. short value16;
  500. int value;
  501. if (!resume)
  502. n_samples = samplerate * length / 1000;
  503. req_samples = (out_end - out_ptr)/2;
  504. if (req_samples > n_samples)
  505. req_samples = n_samples;
  506. result = read_MBR((short *)out_ptr, req_samples);
  507. if (result <= 0)
  508. return 0;
  509. for (ix = 0; ix < result; ix++) {
  510. value16 = out_ptr[0] + (out_ptr[1] << 8);
  511. value = value16 * amplitude;
  512. value = value / 40; // adjust this constant to give a suitable amplitude for mbrola voices
  513. if (value > 0x7fff)
  514. value = 0x7fff;
  515. if (value < -0x8000)
  516. value = 0x8000;
  517. out_ptr[0] = value;
  518. out_ptr[1] = value >> 8;
  519. out_ptr += 2;
  520. }
  521. n_samples -= result;
  522. return n_samples ? 1 : 0;
  523. }
  524. void MbrolaReset(void)
  525. {
  526. // Reset the Mbrola engine and flush the pending audio
  527. reset_MBR();
  528. }
  529. #else
  530. // mbrola interface is not compiled, provide dummy functions.
  531. espeak_ng_STATUS LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int *srate)
  532. {
  533. return ENS_NOT_SUPPORTED;
  534. }
  535. int MbrolaGenerate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
  536. {
  537. return 0;
  538. }
  539. int MbrolaFill(int length, int resume, int amplitude)
  540. {
  541. return 0;
  542. }
  543. void MbrolaReset(void)
  544. {
  545. }
  546. #endif