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.

56 lines
1.5KB

  1. #ifndef STK_PHONEMES_H
  2. #define STK_PHONEMES_H
  3. #include "Stk.h"
  4. namespace stk {
  5. /***************************************************/
  6. /*! \class Phonemes
  7. \brief STK phonemes table.
  8. This class does nothing other than declare a
  9. set of 32 static phoneme formant parameters
  10. and provide access to those values.
  11. by Perry R. Cook and Gary P. Scavone, 1995--2017.
  12. */
  13. /***************************************************/
  14. class Phonemes : public Stk
  15. {
  16. public:
  17. Phonemes( void );
  18. ~Phonemes( void );
  19. //! Returns the phoneme name for the given index (0-31).
  20. static const char *name( unsigned int index );
  21. //! Returns the voiced component gain for the given phoneme index (0-31).
  22. static StkFloat voiceGain( unsigned int index );
  23. //! Returns the unvoiced component gain for the given phoneme index (0-31).
  24. static StkFloat noiseGain( unsigned int index );
  25. //! Returns the formant frequency for the given phoneme index (0-31) and partial (0-3).
  26. static StkFloat formantFrequency( unsigned int index, unsigned int partial );
  27. //! Returns the formant radius for the given phoneme index (0-31) and partial (0-3).
  28. static StkFloat formantRadius( unsigned int index, unsigned int partial );
  29. //! Returns the formant gain for the given phoneme index (0-31) and partial (0-3).
  30. static StkFloat formantGain( unsigned int index, unsigned int partial );
  31. private:
  32. static const char phonemeNames[][4];
  33. static const StkFloat phonemeGains[][2];
  34. static const StkFloat phonemeParameters[][4][3];
  35. };
  36. } // stk namespace
  37. #endif