| 1 | /* SSML (Speech Synthesis Markup Language) processing APIs. |
| 2 | * |
| 3 | * Copyright (C) 2005 to 2015 by Jonathan Duddington |
| 4 | * email: [email protected] |
| 5 | * Copyright (C) 2015-2018 Reece H. Dunn |
| 6 | * Copyright (C) 2018 Juho Hiltunen |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 3 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, see: <http://www.gnu.org/licenses/>. |
| 20 | */ |
| 21 | #ifndef ESPEAK_NG_SSML_API |
| 22 | #define ESPEAK_NG_SSML_APIcxx . . $ `external/espeak/ssml.h:22:9`! |
| 23 | |
| 24 | #include <stdbool.h> |
| 25 | #include <wchar.h> |
| 26 | |
| 27 | #include "speak_lib.h"cxx . . $ `<file>/external/espeak/speak_lib.h`/ |
| 28 | |
| 29 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 30 | extern "C" |
| 31 | { |
| 32 | #endif |
| 33 | |
| 34 | // stack for language and voice properties |
| 35 | // frame 0 is for the defaults, before any ssml tags. |
| 36 | typedef struct { |
| 37 | int tag_type; |
| 38 | int voice_variant_number; |
| 39 | int voice_gender; |
| 40 | int voice_age; |
| 41 | char voice_name[40]; |
| 42 | char language[20]; |
| 43 | } SSML_STACK; |
| 44 | |
| 45 | #define N_PARAM_STACKcxx . . $ `external/espeak/ssml.h:45:9`! 20 |
| 46 | |
| 47 | #define SSML_SPEAKcxx . . $ `external/espeak/ssml.h:47:9`! 1 |
| 48 | #define SSML_VOICEcxx . . $ `external/espeak/ssml.h:48:9`! 2 |
| 49 | #define SSML_PROSODYcxx . . $ `external/espeak/ssml.h:49:9`! 3 |
| 50 | #define SSML_SAYAScxx . . $ `external/espeak/ssml.h:50:9`! 4 |
| 51 | #define SSML_MARKcxx . . $ `external/espeak/ssml.h:51:9`! 5 |
| 52 | #define SSML_SENTENCEcxx . . $ `external/espeak/ssml.h:52:9`! 6 |
| 53 | #define SSML_PARAGRAPHcxx . . $ `external/espeak/ssml.h:53:9`! 7 |
| 54 | #define SSML_PHONEMEcxx . . $ `external/espeak/ssml.h:54:9`! 8 |
| 55 | #define SSML_SUBcxx . . $ `external/espeak/ssml.h:55:9`! 9 |
| 56 | #define SSML_STYLEcxx . . $ `external/espeak/ssml.h:56:9`! 10 |
| 57 | #define SSML_AUDIOcxx . . $ `external/espeak/ssml.h:57:9`! 11 |
| 58 | #define SSML_EMPHASIScxx . . $ `external/espeak/ssml.h:58:9`! 12 |
| 59 | #define SSML_BREAKcxx . . $ `external/espeak/ssml.h:59:9`! 13 |
| 60 | #define SSML_IGNORE_TEXTcxx . . $ `external/espeak/ssml.h:60:9`! 14 |
| 61 | #define HTML_BREAKcxx . . $ `external/espeak/ssml.h:61:9`! 15 |
| 62 | #define HTML_NOSPACEcxx . . $ `external/espeak/ssml.h:62:9`! 16 // don't insert a space for this element, so it doesn't break a word |
| 63 | #define SSML_CLOSEcxx . . $ `external/espeak/ssml.h:63:9`! 0x20 // for a closing tag, OR this with the tag type |
| 64 | |
| 65 | int ProcessSsmlTag(wchar_t *xml_buf, |
| 66 | char *outbuf, |
| 67 | int *outix, |
| 68 | int n_outbuf, |
| 69 | const char *xmlbase, |
| 70 | bool *audio_text, |
| 71 | char *current_voice_id, |
| 72 | espeak_VOICEcxx . . $ espeak_VOICE# *base_voice, |
| 73 | char *base_voice_variant_name, |
| 74 | bool *ignore_text, |
| 75 | bool *clear_skipping_text, |
| 76 | int *sayas_mode, |
| 77 | int *sayas_start, |
| 78 | SSML_STACK *ssml_stack, |
| 79 | int *n_ssml_stack, |
| 80 | int *n_param_stack, |
| 81 | int *speech_parameters); |
| 82 | |
| 83 | int ParseSsmlReference(char *ref, |
| 84 | int *c1, |
| 85 | int *c2); |
| 86 | |
| 87 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 88 | } |
| 89 | #endif |
| 90 | |
| 91 | #endif |