| 1 | #cxx . . $ `<file>/dwtools/SpeechSynthesizer.h`/ifndef _SpeechSynthesizer_h_ |
| 2 | #define _SpeechSynthesizer_h_cxx . . $ `dwtools/SpeechSynthesizer.h:2:9`! |
| 3 | /* SpeechSynthesizer.h |
| 4 | * |
| 5 | * Copyright (C) 2011-2013,2015-2023 David Weenink, 2015,2023,2024 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 | #include "Sound.h"cxx . . $ `<file>/fon/Sound.h`/ |
| 22 | #include "TextGrid.h"cxx . . $ `<file>/fon/TextGrid.h`/ // also for Table |
| 23 | |
| 24 | #define SpeechSynthesizer_PHONEMECODINGS_IPAcxx . . $ `dwtools/SpeechSynthesizer.h:24:9`! 2 |
| 25 | #define SpeechSynthesizer_PHONEMECODINGS_KIRSHENBAUMcxx . . $ `dwtools/SpeechSynthesizer.h:25:9`! 1 |
| 26 | #define SpeechSynthesizer_INPUT_TEXTONLYcxx . . $ `dwtools/SpeechSynthesizer.h:26:9`! 1 |
| 27 | #define SpeechSynthesizer_INPUT_PHONEMESONLYcxx . . $ `dwtools/SpeechSynthesizer.h:27:9`! 2 |
| 28 | #define SpeechSynthesizer_INPUT_TAGGEDTEXTcxx . . $ `dwtools/SpeechSynthesizer.h:28:9`! 3 |
| 29 | |
| 30 | #include "SpeechSynthesizer_def.h"cxx . . $ `<file>/dwtools/SpeechSynthesizer_def.h`/ |
| 31 | |
| 32 | autoSpeechSynthesizercxx . . $ autoSpeechSynthesizer# SpeechSynthesizer_createcxx . . $ SpeechSynthesizer_create(6b21ccb42cc63610). (conststring32cxx . . $ conststring32# languageName, conststring32cxx . . $ conststring32# voiceName); |
| 33 | |
| 34 | void SpeechSynthesizer_setTextInputSettingscxx . . $ SpeechSynthesizer_setTextInputSettings(250003be5444af39). (SpeechSynthesizercxx . . $ SpeechSynthesizer# me, int inputTextFormat, int inputPhonemeCoding); |
| 35 | |
| 36 | void SpeechSynthesizer_setEstimateSpeechRateFromSpeechcxx . . $ SpeechSynthesizer_setEstimateSpeechRateFromSpeech(7640b0b2702d734c). (SpeechSynthesizercxx . . $ SpeechSynthesizer# me, bool estimate); |
| 37 | |
| 38 | void SpeechSynthesizer_setSpeechOutputSettingscxx . . $ SpeechSynthesizer_setSpeechOutputSettings(76b96204784f26df). (SpeechSynthesizercxx . . $ SpeechSynthesizer# me, double samplingFrequency, double wordgap, double pitchAdjustment, double pitchRange, double wordsPerMinute, int outputPhonemeCodes); |
| 39 | |
| 40 | autoSoundcxx . . $ autoSound# SpeechSynthesizer_to_Soundcxx . . $ SpeechSynthesizer_to_Sound(7d8947aebba58a29). (SpeechSynthesizercxx . . $ SpeechSynthesizer# me, conststring32cxx . . $ conststring32# text, autoTextGridcxx . . $ autoTextGrid# *tg, autoTablecxx . . $ autoTable# *events); |
| 41 | |
| 42 | void SpeechSynthesizer_playTextcxx . . $ SpeechSynthesizer_playText(7b7c1d598d867798). (SpeechSynthesizercxx . . $ SpeechSynthesizer# me, conststring32cxx . . $ conststring32# text); |
| 43 | |
| 44 | autostring32cxx . . $ autostring32# SpeechSynthesizer_getPhonemesFromTextcxx . . $ SpeechSynthesizer_getPhonemesFromText(86ef1e8b98e2cf7b). (SpeechSynthesizercxx . . $ SpeechSynthesizer# me, conststring32cxx . . $ conststring32# text, bool separateBySpaces); |
| 45 | |
| 46 | /* |
| 47 | For general use. |
| 48 | */ |
| 49 | extern STRVECcxx . . $ STRVEC# theSpeechSynthesizerLanguageNamescxx . . $ theSpeechSynthesizerLanguageNames.; |
| 50 | extern STRVECcxx . . $ STRVEC# theSpeechSynthesizerVoiceNamescxx . . $ theSpeechSynthesizerVoiceNames.; |
| 51 | |
| 52 | /* |
| 53 | For developers mainly. |
| 54 | */ |
| 55 | extern Tablecxx . . $ Table# theSpeechSynthesizerLanguagePropertiesTablecxx . . $ theSpeechSynthesizerLanguagePropertiesTable.; |
| 56 | extern Tablecxx . . $ Table# theSpeechSynthesizerVoicePropertiesTablecxx . . $ theSpeechSynthesizerVoicePropertiesTable.; |
| 57 | |
| 58 | /* |
| 59 | Create the eSpeak-Praat-FileInMemorySet and the four other objects mentioned above. |
| 60 | */ |
| 61 | void classSpeechSynthesizer_initClasscxx . . $ classSpeechSynthesizer_initClass(49f6e7a06ebc5aa8). (); |
| 62 | |
| 63 | /* |
| 64 | Try to change the language name, the voice name and/or the phoneme set name if any of these are not in the list. |
| 65 | This also translates ISO 639 language codes (or family/language combinations), |
| 66 | and fixes capitalization of the first letter. |
| 67 | Examples of language names: |
| 68 | en -> English (Great Britain) // obsolete |
| 69 | gmw/nl -> Dutch // ISO 639 family/language code (if identical to the eSpeak-internal code) |
| 70 | nl -> Dutch // ISO 639 language code |
| 71 | Examples of voice names: |
| 72 | f1 -> Female1 // obsolete |
| 73 | female1 -> Female1 // capitalization |
| 74 | The following "centric" ones are obsolete nowadays in eSpeak, but will still map in case any ancient Praat scripts use them: |
| 75 | Default -> English (Great Britain) // obsolete |
| 76 | default -> Male1 // obsolete |
| 77 | */ |
| 78 | void SpeechSynthesizer_checkAndRepairLanguageAndVoiceNamescxx . . $ SpeechSynthesizer_checkAndRepairLanguageAndVoiceNames(543b721d812a44d1). (SpeechSynthesizercxx . . $ SpeechSynthesizer# me); |
| 79 | |
| 80 | /* End of file SpeechSynthesizer.h */ |
| 81 | #endif |