| 1 | /* SpeechSynthesizer_def.h |
| 2 | * |
| 3 | * Copyright (C) 2011-2020 David Weenink, 2024 Paul Boersma |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 18 | */ |
| 19 | |
| 20 | #define ooSTRUCT SpeechSynthesizer |
| 21 | oo_DEFINE_CLASS (SpeechSynthesizer, Daata) |
| 22 | |
| 23 | oo_FROM (1) |
| 24 | oo_STRING (dummySynthesizerVersion) // no longer used (was already overwritten at reading time) |
| 25 | oo_ENDFROM |
| 26 | |
| 27 | /* |
| 28 | Three language and voice settings. |
| 29 | */ |
| 30 | oo_STRING (d_languageName) |
| 31 | oo_STRING (d_voiceName) |
| 32 | oo_FROM (1) |
| 33 | oo_STRING (d_phonemeSetName) |
| 34 | oo_ENDFROM |
| 35 | #if oo_READING |
| 36 | oo_VERSION_UNTIL (1) |
| 37 | d_phonemeSetName = Melder_dup (d_languageName.get()); |
| 38 | oo_VERSION_END |
| 39 | SpeechSynthesizer_checkAndRepairLanguageAndVoiceNames (this); |
| 40 | #endif |
| 41 | |
| 42 | #if oo_READING |
| 43 | oo_VERSION_UNTIL (1) |
| 44 | oo_INTEGER (d_wordsPerMinute) |
| 45 | oo_VERSION_ELSE |
| 46 | oo_DOUBLE (d_wordsPerMinute) |
| 47 | oo_VERSION_END |
| 48 | #else |
| 49 | oo_DOUBLE (d_wordsPerMinute) |
| 50 | #endif |
| 51 | // text-only, phonemes-only, mixed |
| 52 | oo_INT (d_inputTextFormat) |
| 53 | // 1/: output phonemes in espeak/ notation |
| 54 | oo_INT (d_inputPhonemeCoding) |
| 55 | // speech output |
| 56 | oo_DOUBLE (d_samplingFrequency) |
| 57 | oo_DOUBLE (d_wordGap) |
| 58 | oo_DOUBLE (d_pitchAdjustment) |
| 59 | oo_DOUBLE (d_pitchRange) |
| 60 | // 1/2: output phonemes in espeak/IPA notation |
| 61 | oo_INT (d_outputPhonemeCoding) |
| 62 | |
| 63 | #if oo_READING_TEXT |
| 64 | oo_VERSION_UNTIL (1) |
| 65 | oo_INT (d_estimateSpeechRate) // this used to be oo_BOOL, which was written in text as 0 or 1, which is inappropriate for boolean text |
| 66 | oo_VERSION_ELSE |
| 67 | oo_QUESTION (d_estimateSpeechRate) |
| 68 | oo_VERSION_END |
| 69 | #else |
| 70 | oo_QUESTION (d_estimateSpeechRate) |
| 71 | #endif |
| 72 | |
| 73 | #if ! oo_READING && ! oo_WRITING && ! oo_COMPARING |
| 74 | // Filled by the callback |
| 75 | oo_OBJECT (Table, 0, d_events) |
| 76 | oo_DOUBLE (d_internalSamplingFrequency) |
| 77 | oo_INTEGER (d_numberOfSamples) |
| 78 | oo_INTEGER (d_wavCapacity) |
| 79 | oo_INTVEC16 (d_wav, d_wavCapacity) |
| 80 | #endif |
| 81 | |
| 82 | #if oo_DECLARING |
| 83 | void v1_info () |
| 84 | override; |
| 85 | #endif |
| 86 | |
| 87 | oo_END_CLASS (SpeechSynthesizer) |
| 88 | #undef ooSTRUCT |
| 89 | |
| 90 | /* End of file SpeechSynthesizer_def.h */ |