KlattTable.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #ifndef _KlattTable_h_
  2. #define _KlattTable_h_
  3. /* KlattTable.h
  4. *
  5. * Copyright (C) 2008-2011, 2015 David Weenink
  6. *
  7. * This code 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 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. /*
  21. djmw 20081018 Initial version
  22. djmw 20110306 Latest modification
  23. */
  24. #include "TableOfReal.h"
  25. #include "Sound.h"
  26. #include "Table.h"
  27. Thing_define (KlattTable, Table) {
  28. };
  29. autoKlattTable KlattTable_create (double frameDuration, double totalDuration);
  30. /*
  31. f0 (08) This is the fundamental frequency (pitch) of the utterance.
  32. In this case it is specified in steps of 0.1 Hz, hence 100Hz
  33. will be represented by a value of 1000.
  34. av (08) Amplitude of voicing for the cascade branch of the
  35. synthesizer in dB0. Range 0-70, value usually 60 for a vowel sound.
  36. f1 (08) First formant frequency in 200-1300 Hz.
  37. b1 (08) Cascade branch bandwidth of first formant in the range 40-1000 Hz.
  38. f2 (08) Second formant frequency in the range 550 - 3000 Hz.
  39. b2 (08) Cascade branch bandwidth of second formant in the range 40-1000 Hz.
  40. f3 (08) Third formant frequency in the range 1200-4999 Hz.
  41. b3 (08) Cascade branch bandwidth of third formant in the range 40-1000 Hz.
  42. f4 (08) Fourth formant frequency in 1200-4999 Hz.
  43. b4 (08) Cascade branch bandwidth of fourth formant in the range 40-1000 Hz.
  44. f5 (08) Fifth formant frequency in the range 1200-4999 Hz.
  45. b5 (08) Cascade branch bandwidth of fifth formant in the range 40-1000 Hz.
  46. f6 (08) Sixth formant frequency in the range 1200-4999 Hz.
  47. b6 (08) Cascade branch bandwidth of sixth formant in the range 40-2000 Hz.
  48. fnz (08) Frequency of the nasal zero in the range 248-528 Hz.
  49. (cascade branch only)
  50. bnz (08) Bandwidth of the nasal zero in the range 40-1000 Hz
  51. (cascade branch only)
  52. fnp (08) Frequency of the nasal pole in the range 248-528 Hz
  53. bnp (08) Bandwidth of the nasal pole in the range 40-1000 Hz
  54. ah (08) Amplitude of aspiration 0-70 dB.
  55. kopen (-8) Open quotient of voicing waveform, range 0-60, usually 30.
  56. Will influence the gravelly or smooth quality of the voice.
  57. Only works with impulse and antural simulations. For the
  58. sampled glottal excitation waveform the open quotient is fixed.
  59. aturb Amplitude of turbulence 0-80 dB. A value of 40 is useful. Can be
  60. used to simulate "breathy" voice quality.
  61. tltdb (-8) Spectral tilt in dB, range 0-24. Tilts down the output spectrum.
  62. The value refers to dB down at 3Khz. Increasing the value emphasizes
  63. the low frequency content of the speech and attenuates the high
  64. frequency content.
  65. af (08) Amplitude of frication in dB, range 0-80 (parallel branch)
  66. skew Spectral Skew - skewness of alternate periods, range 0-40
  67. a1 (08) Amplitude of first formant in the parallel branch, in 0-80 dB.
  68. b1p (-8) Bandwidth of the first formant in the parallel branch, in Hz.
  69. a2 (08) Amplitude of parallel branch second formant.
  70. b2p (-8) Bandwidth of parallel branch second formant.
  71. a3 (08) Amplitude of parallel branch third formant.
  72. b3p (-8) Bandwidth of parallel branch third formant.
  73. a4 (08) Amplitude of parallel branch fourth formant.
  74. b4p (-8) Bandwidth of parallel branch fourth formant.
  75. a5 (08) Amplitude of parallel branch fifth formant.
  76. b5p (-8) Bandwidth of parallel branch fifth formant.
  77. a6 (08) Amplitude of parallel branch sixth formant.
  78. b6p (-8) Bandwidth of parallel branch sixth formant.
  79. anp Amplitude of the parallel branch nasal formant.
  80. ab (08) Amplitude of bypass frication in dB. 0-80.
  81. avp Amplitude of voicing for the parallel branch, 0-70 dB.
  82. gain Overall gain in dB range 0-80.
  83. */
  84. autoSound KlattTable_to_Sound (KlattTable me, double samplingFrequency, int synthesisModel, int numberOfFormants, double frameDuration, int voicing, double flutter, int outputType);
  85. autoSound KlattTable_Sound_to_Sound (KlattTable me, Sound thee);
  86. autoKlattTable KlattTable_createExample ();
  87. autoKlattTable Table_to_KlattTable (Table me);
  88. autoTable KlattTable_to_Table (KlattTable me);
  89. autoKlattTable KlattTable_readFromRawTextFile (MelderFile fs);
  90. #endif /* _KlattTable_h_ */