| /*************************************************************************** | /*************************************************************************** | ||||
| * Copyright (C) 2005 to 2015 by Jonathan Duddington * | * Copyright (C) 2005 to 2015 by Jonathan Duddington * | ||||
| * email: [email protected] * | * email: [email protected] * | ||||
| * Copyright (C) 2015 by Reece H. Dunn * | |||||
| * * | * * | ||||
| * This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
| * it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | ||||
| PARAM_STACK *sp; | PARAM_STACK *sp; | ||||
| SSML_STACK *ssml_sp; | SSML_STACK *ssml_sp; | ||||
| static const MNEM_TAB mnem_phoneme_alphabet[] = { | |||||
| {"espeak",1}, | |||||
| {NULL, -1}}; | |||||
| static const MNEM_TAB mnem_punct[] = { | static const MNEM_TAB mnem_punct[] = { | ||||
| {"none", 1}, | {"none", 1}, | ||||
| {"all", 2}, | {"all", 2}, | ||||
| PopParamStack(tag_type, outbuf, outix); | PopParamStack(tag_type, outbuf, outix); | ||||
| break; | break; | ||||
| case SSML_PHONEME: | |||||
| attr1 = GetSsmlAttribute(px,"alphabet"); | |||||
| attr2 = GetSsmlAttribute(px,"ph"); | |||||
| value = attrlookup(attr1,mnem_phoneme_alphabet); | |||||
| if (value == 1) // alphabet="espeak" | |||||
| { | |||||
| outbuf[(*outix)++] = '['; | |||||
| outbuf[(*outix)++] = '['; | |||||
| *outix += attrcopy_utf8(&outbuf[*outix],attr2,n_outbuf-*outix); | |||||
| outbuf[(*outix)++] = ']'; | |||||
| outbuf[(*outix)++] = ']'; | |||||
| } | |||||
| break; | |||||
| case SSML_SAYAS: | case SSML_SAYAS: | ||||
| attr1 = GetSsmlAttribute(px,"interpret-as"); | attr1 = GetSsmlAttribute(px,"interpret-as"); | ||||
| attr2 = GetSsmlAttribute(px,"format"); | attr2 = GetSsmlAttribute(px,"format"); |