SpeechSynthesizer.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef _SpeechSynthesizer_h_
  2. #define _SpeechSynthesizer_h_
  3. /* SpeechSynthesizer.h
  4. *
  5. * Copyright (C) 2011-2013, 2015-2017 David Weenink, 2015 Paul Boersma
  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 20111214
  22. */
  23. #include "Sound.h"
  24. #include "TextGrid.h"
  25. #include "espeak_ng.h"
  26. #include "FileInMemoryManager.h"
  27. #include "speech.h"
  28. #include "synthesize.h"
  29. #include "espeakdata_FileInMemory.h"
  30. #define SpeechSynthesizer_PHONEMECODINGS_IPA 2
  31. #define SpeechSynthesizer_PHONEMECODINGS_KIRSHENBAUM 1
  32. #define SpeechSynthesizer_INPUT_TEXTONLY 1
  33. #define SpeechSynthesizer_INPUT_PHONEMESONLY 2
  34. #define SpeechSynthesizer_INPUT_TAGGEDTEXT 3
  35. #include "SpeechSynthesizer_def.h"
  36. autoEspeakVoice EspeakVoice_create ();
  37. void EspeakVoice_setDefaults (EspeakVoice me);
  38. void EspeakVoice_initFromEspeakVoice (EspeakVoice me, voice_t *voice);
  39. void SpeechSynthesizer_initEspeak ();
  40. autoSpeechSynthesizer SpeechSynthesizer_create (conststring32 languageName, conststring32 voiceName);
  41. conststring32 SpeechSynthesizer_getLanguageCode (SpeechSynthesizer me);
  42. conststring32 SpeechSynthesizer_getVoiceCode (SpeechSynthesizer me);
  43. void SpeechSynthesizer_changeLanguageNameToCurrent (SpeechSynthesizer me);
  44. void SpeechSynthesizer_setTextInputSettings (SpeechSynthesizer me, int inputTextFormat, int inputPhonemeCoding);
  45. void SpeechSynthesizer_setEstimateSpeechRateFromSpeech (SpeechSynthesizer me, bool estimate);
  46. void SpeechSynthesizer_setSpeechOutputSettings (SpeechSynthesizer me, double samplingFrequency, double wordgap, double pitchAdjustment, double pitchRange, double wordsPerMinute, int outputPhonemeCodes);
  47. autoSound SpeechSynthesizer_to_Sound (SpeechSynthesizer me, conststring32 text, autoTextGrid *tg, autoTable *events);
  48. void SpeechSynthesizer_playText (SpeechSynthesizer me, conststring32 text);
  49. /* End of file SpeechSynthesizer.h */
  50. #endif