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.

synthesize.h 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. /*
  2. * Copyright (C) 2005 to 2014 by Jonathan Duddington
  3. * email: [email protected]
  4. * Copyright (C) 2015-2017 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 <stdbool.h>
  20. #ifdef __cplusplus
  21. extern "C"
  22. {
  23. #endif
  24. #define espeakINITIALIZE_PHONEME_IPA 0x0002 // move this to speak_lib.h, after eSpeak version 1.46.02
  25. #define N_PHONEME_LIST 1000 // enough for source[N_TR_SOURCE] full of text, else it will truncate
  26. #define MAX_HARMONIC 400 // 400 * 50Hz = 20 kHz, more than enough
  27. #define N_SEQ_FRAMES 25 // max frames in a spectrum sequence (real max is ablut 8)
  28. #define STEPSIZE 64 // 2.9mS at 22 kHz sample rate
  29. // flags set for frames within a spectrum sequence
  30. #define FRFLAG_KLATT 0x01 // this frame includes extra data for Klatt synthesizer
  31. #define FRFLAG_VOWEL_CENTRE 0x02 // centre point of vowel
  32. #define FRFLAG_LEN_MOD 0x04 // reduce effect of length adjustment
  33. #define FRFLAG_BREAK_LF 0x08 // but keep f3 upwards
  34. #define FRFLAG_BREAK 0x10 // don't merge with next frame
  35. #define FRFLAG_BREAK_2 0x18 // FRFLAG_BREAK_LF or FRFLAG_BREAK
  36. #define FRFLAG_FORMANT_RATE 0x20 // Flag5 allow increased rate of change of formant freq
  37. #define FRFLAG_MODULATE 0x40 // Flag6 modulate amplitude of some cycles to give trill
  38. #define FRFLAG_DEFER_WAV 0x80 // Flag7 defer mixing WAV until the next frame
  39. #define FRFLAG_LEN_MOD2 0x4000 // reduce effect of length adjustment, used for the start of a vowel
  40. #define FRFLAG_COPIED 0x8000 // This frame has been copied into temporary rw memory
  41. #define SFLAG_SEQCONTINUE 0x01 // a liquid or nasal after a vowel, but not followed by a vowel
  42. #define SFLAG_EMBEDDED 0x02 // there are embedded commands before this phoneme
  43. #define SFLAG_SYLLABLE 0x04 // vowel or syllabic consonant
  44. #define SFLAG_LENGTHEN 0x08 // lengthen symbol : included after this phoneme
  45. #define SFLAG_DICTIONARY 0x10 // the pronunciation of this word was listed in the xx_list dictionary
  46. #define SFLAG_SWITCHED_LANG 0x20 // this word uses phonemes from a different language
  47. #define SFLAG_PROMOTE_STRESS 0x40 // this unstressed word can be promoted to stressed
  48. #define SFLAG_PREV_PAUSE 0x1000 // consider previous phoneme as pause
  49. #define SFLAG_NEXT_PAUSE 0x2000 // consider next phoneme as pause
  50. // embedded command numbers
  51. #define EMBED_P 1 // pitch
  52. #define EMBED_S 2 // speed (used in setlengths)
  53. #define EMBED_A 3 // amplitude/volume
  54. #define EMBED_R 4 // pitch range/expression
  55. #define EMBED_H 5 // echo/reverberation
  56. #define EMBED_T 6 // different tone for announcing punctuation (not used)
  57. #define EMBED_I 7 // sound icon
  58. #define EMBED_S2 8 // speed (used in synthesize)
  59. #define EMBED_Y 9 // say-as commands
  60. #define EMBED_M 10 // mark name
  61. #define EMBED_U 11 // audio uri
  62. #define EMBED_B 12 // break
  63. #define EMBED_F 13 // emphasis
  64. #define EMBED_C 14 // capital letter indication
  65. #define N_EMBEDDED_VALUES 15
  66. extern int embedded_value[N_EMBEDDED_VALUES];
  67. extern int embedded_default[N_EMBEDDED_VALUES];
  68. #define N_PEAKS2 9 // plus Notch and Fill (not yet implemented)
  69. #define N_MARKERS 8
  70. #define N_KLATTP 10 // this affects the phoneme data file format
  71. #define N_KLATTP2 14 // used in vowel files, with extra parameters for future extensions
  72. #define KLATT_AV 0
  73. #define KLATT_FNZ 1 // nasal zero freq
  74. #define KLATT_Tilt 2
  75. #define KLATT_Aspr 3
  76. #define KLATT_Skew 4
  77. #define KLATT_Kopen 5
  78. #define KLATT_AVp 6
  79. #define KLATT_Fric 7
  80. #define KLATT_FricBP 8
  81. #define KLATT_Turb 9
  82. typedef struct { // 64 bytes
  83. short frflags;
  84. short ffreq[7];
  85. unsigned char length;
  86. unsigned char rms;
  87. unsigned char fheight[8];
  88. unsigned char fwidth[6]; // width/4 f0-5
  89. unsigned char fright[3]; // width/4 f0-2
  90. unsigned char bw[4]; // Klatt bandwidth BNZ /2, f1,f2,f3
  91. unsigned char klattp[5]; // AV, FNZ, Tilt, Aspr, Skew
  92. unsigned char klattp2[5]; // continuation of klattp[], Avp, Fric, FricBP, Turb
  93. unsigned char klatt_ap[7]; // Klatt parallel amplitude
  94. unsigned char klatt_bp[7]; // Klatt parallel bandwidth /2
  95. unsigned char spare; // pad to multiple of 4 bytes
  96. } frame_t; // with extra Klatt parameters for parallel resonators
  97. typedef struct { // 44 bytes
  98. short frflags;
  99. short ffreq[7];
  100. unsigned char length;
  101. unsigned char rms;
  102. unsigned char fheight[8];
  103. unsigned char fwidth[6]; // width/4 f0-5
  104. unsigned char fright[3]; // width/4 f0-2
  105. unsigned char bw[4]; // Klatt bandwidth BNZ /2, f1,f2,f3
  106. unsigned char klattp[5]; // AV, FNZ, Tilt, Aspr, Skew
  107. } frame_t2; // without the extra Klatt parameters
  108. // formant data used by wavegen
  109. typedef struct {
  110. int freq; // Hz<<16
  111. int height; // height<<15
  112. int left; // Hz<<16
  113. int right; // Hz<<16
  114. DOUBLEX freq1; // floating point versions of the above
  115. DOUBLEX height1;
  116. DOUBLEX left1;
  117. DOUBLEX right1;
  118. DOUBLEX freq_inc; // increment by this every 64 samples
  119. DOUBLEX height_inc;
  120. DOUBLEX left_inc;
  121. DOUBLEX right_inc;
  122. } wavegen_peaks_t;
  123. typedef struct {
  124. unsigned char *pitch_env;
  125. int pitch; // pitch Hz*256
  126. int pitch_ix; // index into pitch envelope (*256)
  127. int pitch_inc; // increment to pitch_ix
  128. int pitch_base; // Hz*256 low, before modified by envelope
  129. int pitch_range; // Hz*256 range of envelope
  130. unsigned char *mix_wavefile; // wave file to be added to synthesis
  131. int n_mix_wavefile; // length in bytes
  132. int mix_wave_scale; // 0=2 byte samples
  133. int mix_wave_amp;
  134. int mix_wavefile_ix;
  135. int mix_wavefile_max; // length of available WAV data (in bytes)
  136. int mix_wavefile_offset;
  137. int amplitude;
  138. int amplitude_v;
  139. int amplitude_fmt; // percentage amplitude adjustment for formant synthesis
  140. } WGEN_DATA;
  141. typedef struct {
  142. double a;
  143. double b;
  144. double c;
  145. double x1;
  146. double x2;
  147. } RESONATOR;
  148. typedef struct {
  149. short length_total; // not used
  150. unsigned char n_frames;
  151. unsigned char sqflags;
  152. frame_t2 frame[N_SEQ_FRAMES]; // max. frames in a spectrum sequence
  153. } SPECT_SEQ; // sequence of espeak formant frames
  154. typedef struct {
  155. short length_total; // not used
  156. unsigned char n_frames;
  157. unsigned char sqflags;
  158. frame_t frame[N_SEQ_FRAMES]; // max. frames in a spectrum sequence
  159. } SPECT_SEQK; // sequence of klatt formants frames
  160. typedef struct {
  161. short length;
  162. short frflags;
  163. frame_t *frame;
  164. } frameref_t;
  165. // a clause translated into phoneme codes (first stage)
  166. typedef struct {
  167. unsigned short synthflags; // NOTE Put shorts on 32bit boundaries, because of RISC OS compiler bug?
  168. unsigned char phcode;
  169. unsigned char stresslevel;
  170. unsigned short sourceix; // ix into the original source text string, only set at the start of a word
  171. unsigned char wordstress; // the highest level stress in this word
  172. unsigned char tone_ph; // tone phoneme to use with this vowel
  173. } PHONEME_LIST2;
  174. typedef struct {
  175. // The first section is a copy of PHONEME_LIST2
  176. unsigned short synthflags;
  177. unsigned char phcode;
  178. unsigned char stresslevel;
  179. unsigned short sourceix; // ix into the original source text string, only set at the start of a word
  180. unsigned char wordstress; // the highest level stress in this word
  181. unsigned char tone_ph; // tone phoneme to use with this vowel
  182. PHONEME_TAB *ph;
  183. unsigned int length; // length_mod
  184. unsigned char env; // pitch envelope number
  185. unsigned char type;
  186. unsigned char prepause;
  187. unsigned char postpause;
  188. unsigned char amp;
  189. unsigned char newword; // bit 0=start of word, bit 1=end of clause, bit 2=start of sentence
  190. unsigned char pitch1;
  191. unsigned char pitch2;
  192. unsigned char std_length;
  193. unsigned int phontab_addr;
  194. int sound_param;
  195. } PHONEME_LIST;
  196. #define pd_FMT 0
  197. #define pd_WAV 1
  198. #define pd_VWLSTART 2
  199. #define pd_VWLEND 3
  200. #define pd_ADDWAV 4
  201. #define N_PHONEME_DATA_PARAM 16
  202. #define pd_INSERTPHONEME i_INSERT_PHONEME
  203. #define pd_APPENDPHONEME i_APPEND_PHONEME
  204. #define pd_CHANGEPHONEME i_CHANGE_PHONEME
  205. #define pd_CHANGE_NEXTPHONEME i_REPLACE_NEXT_PHONEME
  206. #define pd_LENGTHMOD i_SET_LENGTH
  207. #define pd_FORNEXTPH 0x2
  208. #define pd_DONTLENGTHEN 0x4
  209. #define pd_REDUCELENGTHCHANGE 0x8
  210. typedef struct {
  211. int pd_control;
  212. int pd_param[N_PHONEME_DATA_PARAM]; // set from group 0 instructions
  213. int sound_addr[5];
  214. int sound_param[5];
  215. int vowel_transition[4];
  216. int pitch_env;
  217. int amp_env;
  218. char ipa_string[18];
  219. } PHONEME_DATA;
  220. typedef struct {
  221. int fmt_control;
  222. int use_vowelin;
  223. int fmt_addr;
  224. int fmt_length;
  225. int fmt_amp;
  226. int fmt2_addr;
  227. int fmt2_lenadj;
  228. int wav_addr;
  229. int wav_amp;
  230. int transition0;
  231. int transition1;
  232. int std_length;
  233. } FMT_PARAMS;
  234. typedef struct {
  235. PHONEME_LIST prev_vowel;
  236. } WORD_PH_DATA;
  237. // instructions
  238. #define INSTN_RETURN 0x0001
  239. #define INSTN_CONTINUE 0x0002
  240. // Group 0 instrcutions with 8 bit operand. These values go into bits 8-15 of the instruction
  241. #define i_CHANGE_PHONEME 0x01
  242. #define i_REPLACE_NEXT_PHONEME 0x02
  243. #define i_INSERT_PHONEME 0x03
  244. #define i_APPEND_PHONEME 0x04
  245. #define i_APPEND_IFNEXTVOWEL 0x05
  246. #define i_VOICING_SWITCH 0x06
  247. #define i_PAUSE_BEFORE 0x07
  248. #define i_PAUSE_AFTER 0x08
  249. #define i_LENGTH_MOD 0x09
  250. #define i_SET_LENGTH 0x0a
  251. #define i_LONG_LENGTH 0x0b
  252. #define i_ADD_LENGTH 0x0c
  253. #define i_IPA_NAME 0x0d
  254. #define i_CHANGE_IF 0x10 // 0x10 to 0x14
  255. // conditions and jumps
  256. #define i_CONDITION 0x2000
  257. #define i_OR 0x1000 // added to i_CONDITION
  258. #define i_NOT 0x0003
  259. #define i_JUMP 0x6000
  260. #define i_JUMP_FALSE 0x6800
  261. #define i_SWITCH_NEXTVOWEL 0x6a00
  262. #define i_SWITCH_PREVVOWEL 0x6c00
  263. #define MAX_JUMP 255 // max jump distance
  264. // multi-word instructions
  265. #define i_CALLPH 0x9100
  266. #define i_PITCHENV 0x9200
  267. #define i_AMPENV 0x9300
  268. #define i_VOWELIN 0xa100
  269. #define i_VOWELOUT 0xa200
  270. #define i_FMT 0xb000
  271. #define i_WAV 0xc000
  272. #define i_VWLSTART 0xd000
  273. #define i_VWLENDING 0xe000
  274. #define i_WAVADD 0xf000
  275. // conditions
  276. #define CONDITION_IS_PHONEME_TYPE 0x00
  277. #define CONDITION_IS_PLACE_OF_ARTICULATION 0x20
  278. #define CONDITION_IS_PHFLAG_SET 0x40
  279. #define CONDITION_IS_OTHER 0x80
  280. // other conditions (stress)
  281. #define STRESS_IS_DIMINISHED 0 // diminished, unstressed within a word
  282. #define STRESS_IS_UNSTRESSED 1 // unstressed, weak
  283. #define STRESS_IS_NOT_STRESSED 2 // default, not stressed
  284. #define STRESS_IS_SECONDARY 3 // secondary stress
  285. #define STRESS_IS_PRIMARY 4 // primary (main) stress
  286. #define STRESS_IS_PRIORITY 5 // replaces primary markers
  287. #define STRESS_IS_EMPHASIZED 6 // emphasized
  288. // other conditions
  289. #define isAfterStress 9
  290. #define isNotVowel 10
  291. #define isFinalVowel 11
  292. #define isVoiced 12 // voiced consonant, or vowel
  293. #define isFirstVowel 13
  294. #define isSecondVowel 14
  295. #define isTranslationGiven 16 // phoneme translation given in **_list or as [[...]]
  296. #define isBreak 17 // pause phoneme or (stop/vstop/vfric not followed by vowel or (liquid in same word))
  297. #define isWordStart 18
  298. #define isWordEnd 19
  299. #define i_StressLevel 0x800
  300. typedef struct {
  301. int name;
  302. int length;
  303. char *data;
  304. char *filename;
  305. } SOUND_ICON;
  306. typedef struct {
  307. int name;
  308. unsigned int next_phoneme;
  309. int mbr_name;
  310. int mbr_name2;
  311. int percent; // percentage length of first component
  312. int control;
  313. } MBROLA_TAB;
  314. typedef struct {
  315. int pause_factor;
  316. int clause_pause_factor;
  317. unsigned int min_pause;
  318. int wav_factor;
  319. int lenmod_factor;
  320. int lenmod2_factor;
  321. int min_sample_len;
  322. int loud_consonants;
  323. int fast_settings[8];
  324. } SPEED_FACTORS;
  325. typedef struct {
  326. char name[12];
  327. unsigned char flags[4];
  328. signed char head_extend[8];
  329. unsigned char prehead_start;
  330. unsigned char prehead_end;
  331. unsigned char stressed_env;
  332. unsigned char stressed_drop;
  333. unsigned char secondary_drop;
  334. unsigned char unstressed_shape;
  335. unsigned char onset;
  336. unsigned char head_start;
  337. unsigned char head_end;
  338. unsigned char head_last;
  339. unsigned char head_max_steps;
  340. unsigned char n_head_extend;
  341. signed char unstr_start[3]; // for: onset, head, last
  342. signed char unstr_end[3];
  343. unsigned char nucleus0_env; // pitch envelope, tonic syllable is at end, no tail
  344. unsigned char nucleus0_max;
  345. unsigned char nucleus0_min;
  346. unsigned char nucleus1_env; // when followed by a tail
  347. unsigned char nucleus1_max;
  348. unsigned char nucleus1_min;
  349. unsigned char tail_start;
  350. unsigned char tail_end;
  351. unsigned char split_nucleus_env;
  352. unsigned char split_nucleus_max;
  353. unsigned char split_nucleus_min;
  354. unsigned char split_tail_start;
  355. unsigned char split_tail_end;
  356. unsigned char split_tune;
  357. unsigned char spare[8];
  358. int spare2; // the struct length should be a multiple of 4 bytes
  359. } TUNE;
  360. extern int n_tunes;
  361. extern TUNE *tunes;
  362. // phoneme table
  363. extern PHONEME_TAB *phoneme_tab[N_PHONEME_TAB];
  364. // list of phonemes in a clause
  365. extern int n_phoneme_list;
  366. extern PHONEME_LIST phoneme_list[N_PHONEME_LIST+1];
  367. extern unsigned int embedded_list[];
  368. extern unsigned char env_fall[128];
  369. extern unsigned char env_rise[128];
  370. extern unsigned char env_frise[128];
  371. #define MAX_PITCH_VALUE 101
  372. extern unsigned char pitch_adjust_tab[MAX_PITCH_VALUE+1];
  373. // queue of commands for wavegen
  374. #define WCMD_KLATT 1
  375. #define WCMD_KLATT2 2
  376. #define WCMD_SPECT 3
  377. #define WCMD_SPECT2 4
  378. #define WCMD_PAUSE 5
  379. #define WCMD_WAVE 6
  380. #define WCMD_WAVE2 7
  381. #define WCMD_AMPLITUDE 8
  382. #define WCMD_PITCH 9
  383. #define WCMD_MARKER 10
  384. #define WCMD_VOICE 11
  385. #define WCMD_EMBEDDED 12
  386. #define WCMD_MBROLA_DATA 13
  387. #define WCMD_FMT_AMPLITUDE 14
  388. #define WCMD_SONIC_SPEED 15
  389. #define N_WCMDQ 170
  390. #define MIN_WCMDQ 25 // need this many free entries before adding new phoneme
  391. extern intptr_t wcmdq[N_WCMDQ][4];
  392. extern int wcmdq_head;
  393. extern int wcmdq_tail;
  394. // from Wavegen file
  395. int WcmdqFree(void);
  396. void WcmdqStop(void);
  397. int WcmdqUsed(void);
  398. void WcmdqInc(void);
  399. void WavegenInit(int rate, int wavemult_fact);
  400. int WavegenFill(void);
  401. void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *out_ptr);
  402. int GetAmplitude(void);
  403. void SetPitch2(voice_t *voice, int pitch1, int pitch2, int *pitch_base, int *pitch_range);
  404. int PeaksToHarmspect(wavegen_peaks_t *peaks, int pitch, int *htab, int control);
  405. extern unsigned char *wavefile_data;
  406. extern int samplerate;
  407. extern int samplerate_native;
  408. extern int wavefile_ix;
  409. extern int wavefile_amp;
  410. extern int wavefile_ix2;
  411. extern int wavefile_amp2;
  412. extern int vowel_transition[4];
  413. extern int vowel_transition0, vowel_transition1;
  414. #define N_ECHO_BUF 5500 // max of 250mS at 22050 Hz
  415. extern int echo_head;
  416. extern int echo_tail;
  417. extern int echo_amp;
  418. extern short echo_buf[N_ECHO_BUF];
  419. extern int mbrola_delay;
  420. extern char mbrola_name[20];
  421. // from synthdata file
  422. unsigned int LookupSound(PHONEME_TAB *ph1, PHONEME_TAB *ph2, int which, int *match_level, int control);
  423. frameref_t *LookupSpect(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, int *n_frames, PHONEME_LIST *plist);
  424. void FreePhData(void);
  425. unsigned char *LookupEnvelope(int ix);
  426. espeak_ng_STATUS LoadPhData(int *srate, espeak_ng_ERROR_CONTEXT *context);
  427. void SynthesizeInit(void);
  428. int Generate(PHONEME_LIST *phoneme_list, int *n_ph, bool resume);
  429. void MakeWave2(PHONEME_LIST *p, int n_ph);
  430. int SpeakNextClause(int control);
  431. void SetSpeed(int control);
  432. void SetEmbedded(int control, int value);
  433. void SelectPhonemeTable(int number);
  434. int SelectPhonemeTableName(const char *name);
  435. int FormantTransition2(frameref_t *seq, int *n_frames, unsigned int data1, unsigned int data2, PHONEME_TAB *other_ph, int which);
  436. void Write4Bytes(FILE *f, int value);
  437. int Read4Bytes(FILE *f);
  438. int Reverse4Bytes(int word);
  439. #if HAVE_SONIC_H
  440. void DoSonicSpeed(int value);
  441. #endif
  442. #define ENV_LEN 128 // length of pitch envelopes
  443. #define PITCHfall 0 // standard pitch envelopes
  444. #define PITCHrise 2
  445. #define N_ENVELOPE_DATA 20
  446. extern unsigned char *envelope_data[N_ENVELOPE_DATA];
  447. extern int formant_rate[]; // max rate of change of each formant
  448. extern SPEED_FACTORS speed;
  449. extern long count_samples;
  450. extern unsigned char *out_ptr;
  451. extern unsigned char *out_start;
  452. extern unsigned char *out_end;
  453. extern int event_list_ix;
  454. extern espeak_EVENT *event_list;
  455. extern t_espeak_callback *synth_callback;
  456. extern const char *version_string;
  457. extern const int version_phdata;
  458. extern double sonicSpeed;
  459. #define N_SOUNDICON_TAB 80 // total entries in soundicon_tab
  460. #define N_SOUNDICON_SLOTS 4 // number of slots reserved for dynamic loading of audio files
  461. extern int n_soundicon_tab;
  462. extern SOUND_ICON soundicon_tab[N_SOUNDICON_TAB];
  463. espeak_ng_STATUS LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int *srate);
  464. espeak_ng_STATUS SetParameter(int parameter, int value, int relative);
  465. int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, bool resume, FILE *f_mbrola);
  466. int MbrolaGenerate(PHONEME_LIST *phoneme_list, int *n_ph, bool resume);
  467. int MbrolaFill(int length, bool resume, int amplitude);
  468. void MbrolaReset(void);
  469. void DoEmbedded(int *embix, int sourceix);
  470. void DoMarker(int type, int char_posn, int length, int value);
  471. void DoPhonemeMarker(int type, int char_posn, int length, char *name);
  472. int DoSample3(PHONEME_DATA *phdata, int length_mod, int amp);
  473. int DoSpect2(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, PHONEME_LIST *plist, int modulation);
  474. int PauseLength(int pause, int control);
  475. int LookupPhonemeTable(const char *name);
  476. unsigned char *GetEnvelope(int index);
  477. int NumInstnWords(USHORT *prog);
  478. void InitBreath(void);
  479. #ifdef __cplusplus
  480. }
  481. #endif