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.

voice.h 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /***************************************************************************
  2. * Copyright (C) 2005 by Jonathan Duddington *
  3. * [email protected] *
  4. * *
  5. * This program is free software; you can redistribute it and/or modify *
  6. * it under the terms of the GNU General Public License as published by *
  7. * the Free Software Foundation; either version 2 of the License, or *
  8. * (at your option) any later version. *
  9. * *
  10. * This program is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * GNU General Public License for more details. *
  14. * *
  15. * You should have received a copy of the GNU General Public License *
  16. * along with this program; if not, write to the *
  17. * Free Software Foundation, Inc., *
  18. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  19. ***************************************************************************/
  20. typedef struct {
  21. char name[40];
  22. int phoneme_tab_ix; // phoneme table number
  23. int pitch_base; // Hz<<12
  24. int pitch_range; // standard = 0x1000
  25. int speedf1;
  26. int speedf2;
  27. int speedf3;
  28. int flutter;
  29. int roughness;
  30. int echo_delay;
  31. int echo_amp;
  32. int n_harmonic_peaks; // highest formant which is formed from adding harmonics
  33. int peak_shape; // alternative shape for formant peaks (0=standard 1=squarer)
  34. // parameters used by Wavegen
  35. int freq[N_PEAKS]; // 100% = 256
  36. int height[N_PEAKS]; // 100% = 256
  37. int width[N_PEAKS]; // 100% = 256
  38. // copies without temporary adjustments from embedded commands
  39. int freq2[N_PEAKS]; // 100% = 256
  40. int height2[N_PEAKS]; // 100% = 256
  41. int width2[N_PEAKS]; // 100% = 256
  42. // This table provides the opportunity for tone control.
  43. // Adjustment of harmonic amplitudes, steps of 8Hz
  44. // value of 128 means no change
  45. #define N_TONE_ADJUST 1000
  46. unsigned char tone_adjust[N_TONE_ADJUST]; // 8Hz steps * 1000 = 8kHz
  47. } voice_t;
  48. // percentages shown to user, ix=N_PEAKS means ALL peaks
  49. extern USHORT voice_pcnt[N_PEAKS+1][3];
  50. extern voice_t *voice;
  51. extern int tone_points[10];
  52. voice_t *LoadVoice(char *voice_name, int control);
  53. voice_t *LoadVoiceVariant(const char *voice_name, int variant);
  54. void WavegenSetVoice(voice_t *v);
  55. void ReadTonePoints(char *string, int *tone_pts);