From 5d2e2a2f8ff91473c8075114650fc3e4d094a642 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sun, 29 Jan 2017 00:29:17 +0000 Subject: [PATCH] Use the place of articulation constants to specify the place-based conditions. --- src/libespeak-ng/compiledata.c | 2 +- src/libespeak-ng/synthdata.c | 5 +---- src/libespeak-ng/synthesize.h | 6 ++---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/libespeak-ng/compiledata.c b/src/libespeak-ng/compiledata.c index 77e0ad03..3dc607b9 100644 --- a/src/libespeak-ng/compiledata.c +++ b/src/libespeak-ng/compiledata.c @@ -118,7 +118,7 @@ static keywtab_t k_properties[] = { { "isFlag1", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_FLAG1 }, { "isFlag2", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_FLAG2 }, - { "isVel", 0, i_isVel }, + { "isVel", 0, CONDITION_IS_PLACE_OF_ARTICULATION | phPLACE_VELAR }, { "isDiminished", 0, i_isDiminished }, { "isUnstressed", 0, i_isUnstressed }, diff --git a/src/libespeak-ng/synthdata.c b/src/libespeak-ng/synthdata.c index 868b1a58..6cd3a780 100644 --- a/src/libespeak-ng/synthdata.c +++ b/src/libespeak-ng/synthdata.c @@ -631,13 +631,10 @@ static bool InterpretCondition(Translator *tr, int control, PHONEME_LIST *plist, switch (instn & 0xe0) { case CONDITION_IS_PHONEME_TYPE: - // phoneme type, vowel, nasal, fricative, etc return ph->type == data; - case 0x20: - // place of articulation + case CONDITION_IS_PLACE_OF_ARTICULATION: return ((ph->phflags >> 16) & 0xf) == data; case CONDITION_IS_PHFLAG_SET: - // is a bit set in phoneme flags return (ph->phflags & (1 << data)) != 0; case 0x80: switch (data) diff --git a/src/libespeak-ng/synthesize.h b/src/libespeak-ng/synthesize.h index e8f25ba4..fa574e92 100644 --- a/src/libespeak-ng/synthesize.h +++ b/src/libespeak-ng/synthesize.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2005 to 2014 by Jonathan Duddington * email: jonsd@users.sourceforge.net - * Copyright (C) 2015-2016 Reece H. Dunn + * Copyright (C) 2015-2017 Reece H. Dunn * * 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 @@ -329,10 +329,8 @@ typedef struct { #define i_isSecondVowel 0x8e #define i_IsTranslationGiven 0x90 -// place of articulation -#define i_isVel 0x28 - #define CONDITION_IS_PHONEME_TYPE 0x00 +#define CONDITION_IS_PLACE_OF_ARTICULATION 0x20 #define CONDITION_IS_PHFLAG_SET 0x40 #define i_StressLevel 0x800