Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

phon.h File Reference

#include "util.h"

Include dependency graph for phon.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

class  phon
struct  PHON_FEATURES

Defines

#define USE_F0_ALTERNATING   1
#define USE_FLUTTER   2
#define TIME_ALIGNED   1
#define STEADY_STATE_CUT   2

Enumerations

enum  CO_TYPE {
  progressive,
  regressive,
  both
}
 typedef: coarticulation affect the successors, the predecessors or both. More...

enum  PHON_TYPE {
  vowel,
  consonant
}
 typedef: each phone is either vowel or consonant. More...

enum  FORMANT_QUADRANT {
  noQuadrant,
  topLeft,
  topRight,
  bottomRight,
  bottomLeft
}
 typedef: quadrant in the vowelchart, consonants and diphtongs are noQuadrant. More...

enum  PHON_MANNER {
  long_vowel,
  short_vowel,
  liquide,
  nasal,
  fricative_voiced,
  fricative_voiceless,
  stop_voiced,
  stop_voiceless,
  silence,
  noManner
}
 typedef: manner of articulation. More...

enum  PHON_PLACE {
  noPlace,
  bilabial,
  labial,
  labiodental,
  alveolar,
  postalveolar,
  palatal,
  velar,
  uvular,
  glottal
}
 typedef: place of articulation. More...


Functions

void initPhonFeatures (PHON_FEATURES &phonFeatures)
 sets all features to default values (zero).

PHON_MANNER classify_german (char *phone)
 categorizes the phones (language dependend). More...

void exitErr (char *msg, char *str, int ErrNum)
 prints and error message and exits the program. More...


Variables

const uint center_F1 = 500
 The central first formant-centerfreq for vowels.

const uint center_F2 = 1500
 The central second formant-centerfreq for vowels.


Define Documentation

#define STEADY_STATE_CUT   2
 

#define TIME_ALIGNED   1
 

#define USE_F0_ALTERNATING   1
 

#define USE_FLUTTER   2
 


Enumeration Type Documentation

enum CO_TYPE
 

typedef: coarticulation affect the successors, the predecessors or both.

Enumeration values:
progressive  
regressive  
both  
00047              {
00048   progressive,
00049   regressive,
00050   both
00051 }

enum FORMANT_QUADRANT
 

typedef: quadrant in the vowelchart, consonants and diphtongs are noQuadrant.

Enumeration values:
noQuadrant  
topLeft  
topRight  
bottomRight  
bottomLeft  
00157              {
00158   noQuadrant,
00159   topLeft,
00160   topRight,
00161   bottomRight,
00162   bottomLeft
00163 }

enum PHON_MANNER
 

typedef: manner of articulation.

Enumeration values:
long_vowel  
short_vowel  
liquide  
nasal  
fricative_voiced  
fricative_voiceless  
stop_voiced  
stop_voiceless  
silence  
noManner  
00168              {
00169   long_vowel, 
00170   short_vowel,
00171   liquide, 
00172   nasal, 
00173   fricative_voiced, 
00174   fricative_voiceless, 
00175   stop_voiced, 
00176   stop_voiceless, 
00177   silence,
00178   noManner
00179 }

enum PHON_PLACE
 

typedef: place of articulation.

Enumeration values:
noPlace  
bilabial  
labial  
labiodental  
alveolar  
postalveolar  
palatal  
velar  
uvular  
glottal  
00184              {
00185   noPlace,
00186   bilabial,
00187   labial,
00188   labiodental,
00189   alveolar,
00190   postalveolar,
00191   palatal,
00192   velar,
00193   uvular,
00194   glottal
00195 }

enum PHON_TYPE
 

typedef: each phone is either vowel or consonant.

Enumeration values:
vowel  
consonant  
00148              {
00149   vowel,
00150   consonant
00151 }


Function Documentation

PHON_MANNER classify_german ( char * phone )
 

categorizes the phones (language dependend).

Todo:
provide for more languages.
Parameters:
char   *phone phone-name in Sampa
Returns:
PHON_MANNER
01523                                                     {
01524   char *possible_phones[] = {"_",     /* 0 silence */
01525                              "?", "p", "t", "k",  /* 1-4   stop_voiceless */
01526                              "b", "d", "g",  /* 5-7   stop_voiced */
01527                              "f", "s", "S", "x", "C", /* 8-12  fricative_voiceless */
01528                              "pf", "ts", "tS",  /* 13-15 fricative_voiceless */
01529                              "v", "z", "Z",  "h",  /* 16-19 fricative_voiced */
01530                              "m", "n", "N",   /* 20-22 nasal */
01531                              "l", "R",        /* 23-24 liquide */
01532                              "j",             /* 25    semi vowel */
01533                              "6", "@", "I", "Y", "E", "9", "U", "O", "a",   /* 26-34 short vowel */
01534                              "i:", "y:", "e:", "E:", "2:", "u:", "o:", "a:",/* 35-42 long vowel */
01535                              "aI", "OY", "aU", "I6", "NA"};  /* 43-46 long_vowel */
01536   
01537   int index;
01538   
01539   for(index=0;; index++) {
01540     if (strcmp(phone, possible_phones[index])==0)
01541       break;
01542     else if (strcmp("NA", possible_phones[index])==0) {
01543       exitErr("classify_german: %s: no such Phone\n", phone, -1);
01544     }
01545   }
01546   
01547   if (index >= 0 && index <= 0)
01548     return silence;
01549   else if (index >= 1 && index <= 4)
01550     return stop_voiceless;
01551   else if (index >= 5 && index <= 7)
01552     return stop_voiced;
01553   else if (index >= 8 && index <= 15)
01554     return fricative_voiceless;
01555   else if (index >= 16 && index <= 19)
01556     return fricative_voiced;
01557   else if (index >= 20 && index <= 22)
01558     return nasal;
01559   else if (index >= 23 && index <= 24)
01560     return liquide;
01561   else if (index >= 25 && index <= 34)
01562     return short_vowel;
01563   else if (index >= 35 && index <= 46)
01564     return long_vowel;
01565   else {
01566     fprintf(stderr, "something's wrong in classify_german\n");
01567     exit(-3);
01568   }
01569 }

void exitErr ( char * msg,
char * str,
int ErrNum )
 

prints and error message and exits the program.

example: exitErr("classify_german: %s: no such Phone
", phone, -1);

Parameters:
char   *msg, the actual message
char   *str, a variable to be placed in the message
int   ErrNum, exit code
01517                                                           {
01518   fprintf(stderr, "ERROR: ");
01519   fprintf(stderr, msg, str);
01520   exit(ErrNum);
01521 }

void initPhonFeatures ( PHON_FEATURES & phonFeatures )
 

sets all features to default values (zero).

01472                                                    {
01473 
01474   phonFeatures.voiced = false;
01475   phonFeatures.vocStart = 0;
01476   phonFeatures.vocStop = 0;
01477   phonFeatures.breathy = false;
01478   phonFeatures.brtStart = 0;
01479   phonFeatures.brtStop = 0;
01480   phonFeatures.brtRate = 0;
01481   phonFeatures.nasalized = false;
01482   phonFeatures.nasStart = 0;
01483   phonFeatures.nasStop = 0;
01484   phonFeatures.laryngealized = false;
01485   phonFeatures.larStart = 0;
01486   phonFeatures.larStop = 0;
01487   phonFeatures.larRate = 0;
01488   phonFeatures.creaky = false;
01489   phonFeatures.creakyStart = 0;
01490   phonFeatures.creakyStop = 0;
01491   phonFeatures.creakyRate = 0;
01492   phonFeatures.spread = false;
01493   phonFeatures.spreadRate = 0;
01494   phonFeatures.rounded = false;
01495   phonFeatures.roundedRate = 0;
01496   phonFeatures.tense = false;
01497   phonFeatures.tenseRate = 0;
01498   phonFeatures.falsett = false;
01499   phonFeatures.falsettRate = 0;
01500   phonFeatures.whisper = false;
01501   phonFeatures.whisperRate = 0;
01502   phonFeatures.lax = false;
01503   phonFeatures.undershoot = false;
01504   phonFeatures.undershootRate = 0;
01505   phonFeatures.overshoot = false;
01506   phonFeatures.overshootRate = 0;
01507   phonFeatures.jitter = false;
01508   phonFeatures.jitterRate = 0;  
01509   phonFeatures.jitterMethod = 0;  
01510   phonFeatures.coarticulation = false;
01511   phonFeatures.coarticulationRate = 0;  
01512   phonFeatures.coarticulationType = regressive;  
01513   phonFeatures.headSize = false;
01514   phonFeatures.headSizeRate = 0;  
01515 }


Variable Documentation

const uint center_F1 = 500
 

The central first formant-centerfreq for vowels.

const uint center_F2 = 1500
 

The central second formant-centerfreq for vowels.

generated by doxygen