Browse Source

Use the place of articulation constants to specify the place-based conditions.

master
Reece H. Dunn 8 years ago
parent
commit
5d2e2a2f8f
3 changed files with 4 additions and 9 deletions
  1. 1
    1
      src/libespeak-ng/compiledata.c
  2. 1
    4
      src/libespeak-ng/synthdata.c
  3. 2
    4
      src/libespeak-ng/synthesize.h

+ 1
- 1
src/libespeak-ng/compiledata.c View File

{ "isFlag1", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_FLAG1 }, { "isFlag1", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_FLAG1 },
{ "isFlag2", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_FLAG2 }, { "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 }, { "isDiminished", 0, i_isDiminished },
{ "isUnstressed", 0, i_isUnstressed }, { "isUnstressed", 0, i_isUnstressed },

+ 1
- 4
src/libespeak-ng/synthdata.c View File

switch (instn & 0xe0) switch (instn & 0xe0)
{ {
case CONDITION_IS_PHONEME_TYPE: case CONDITION_IS_PHONEME_TYPE:
// phoneme type, vowel, nasal, fricative, etc
return ph->type == data; return ph->type == data;
case 0x20:
// place of articulation
case CONDITION_IS_PLACE_OF_ARTICULATION:
return ((ph->phflags >> 16) & 0xf) == data; return ((ph->phflags >> 16) & 0xf) == data;
case CONDITION_IS_PHFLAG_SET: case CONDITION_IS_PHFLAG_SET:
// is a bit set in phoneme flags
return (ph->phflags & (1 << data)) != 0; return (ph->phflags & (1 << data)) != 0;
case 0x80: case 0x80:
switch (data) switch (data)

+ 2
- 4
src/libespeak-ng/synthesize.h View File

/* /*
* Copyright (C) 2005 to 2014 by Jonathan Duddington * Copyright (C) 2005 to 2014 by Jonathan Duddington
* email: [email protected] * email: [email protected]
* 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 * 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
#define i_isSecondVowel 0x8e #define i_isSecondVowel 0x8e
#define i_IsTranslationGiven 0x90 #define i_IsTranslationGiven 0x90


// place of articulation
#define i_isVel 0x28

#define CONDITION_IS_PHONEME_TYPE 0x00 #define CONDITION_IS_PHONEME_TYPE 0x00
#define CONDITION_IS_PLACE_OF_ARTICULATION 0x20
#define CONDITION_IS_PHFLAG_SET 0x40 #define CONDITION_IS_PHFLAG_SET 0x40


#define i_StressLevel 0x800 #define i_StressLevel 0x800

Loading…
Cancel
Save