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.

dictionary.h 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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_DICTIONARY_H
  21. #define ESPEAK_NG_DICTIONARY_H
  22. #include "espeak-ng/espeak_ng.h" // for ESPEAK_NG_API
  23. #include "phoneme.h" // for PHONEME_TAB
  24. #include "synthesize.h" // for PHONEME_LIST
  25. #include "translate.h" // for Translator, WORD_TAB
  26. #ifdef __cplusplus
  27. extern "C"
  28. {
  29. #endif
  30. extern const char stress_phonemes[];
  31. int LoadDictionary(Translator *tr, const char *name, int no_error);
  32. int HashDictionary(const char *string);
  33. const char *EncodePhonemes(const char *p, char *outptr, int *bad_phoneme);
  34. void DecodePhonemes(const char *inptr, char *outptr);
  35. char *WritePhMnemonic(char *phon_out, PHONEME_TAB *ph, PHONEME_LIST *plist, int use_ipa, int *flags);
  36. const char *GetTranslatedPhonemeString(int phoneme_mode);
  37. int GetVowelStress(Translator *tr, unsigned char *phonemes, signed char *vowel_stress, int *vowel_count, int *stressed_syllable, int control);
  38. int IsVowel(Translator *tr, int letter);
  39. void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, int tonic, int control);
  40. void AppendPhonemes(Translator *tr, char *string, int size, const char *ph);
  41. int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, char *end_phonemes, int word_flags, unsigned int *dict_flags);
  42. int TransposeAlphabet(Translator *tr, char *text);
  43. int Lookup(Translator *tr, const char *word, char *ph_out);
  44. int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *flags, int end_flags, WORD_TAB *wtab);
  45. int RemoveEnding(Translator *tr, char *word, int end_type, char *word_copy);
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif