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.

wavegen.h 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. #ifndef ESPEAK_NG_WAVEGEN_H
  21. #define ESPEAK_NG_WAVEGEN_H
  22. #include "voice.h"
  23. #ifdef __cplusplus
  24. extern "C"
  25. {
  26. #endif
  27. typedef struct {
  28. int freq; // Hz<<16
  29. int height; // height<<15
  30. int left; // Hz<<16
  31. int right; // Hz<<16
  32. double freq1; // floating point versions of the above
  33. double height1;
  34. double left1;
  35. double right1;
  36. double freq_inc; // increment by this every 64 samples
  37. double height_inc;
  38. double left_inc;
  39. double right_inc;
  40. } wavegen_peaks_t;
  41. int GetAmplitude(void);
  42. void InitBreath(void);
  43. int PeaksToHarmspect(wavegen_peaks_t *peaks,
  44. int pitch,
  45. int *htab,
  46. int control);
  47. void SetPitch2(voice_t *voice,
  48. int pitch1,
  49. int pitch2,
  50. int *pitch_base,
  51. int *pitch_range);
  52. void WavegenInit(int rate,
  53. int wavemult_fact);
  54. void WavegenFini(void);
  55. int WavegenFill(void);
  56. void WavegenSetVoice(voice_t *v);
  57. int WcmdqFree(void);
  58. void WcmdqStop(void);
  59. int WcmdqUsed(void);
  60. void WcmdqInc(void);
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64. #endif