#include "phon.h"
Include dependency graph for phon.cc:
Functions | |
void | initPhonFeatures (PHON_FEATURES &phonFeatures) |
sets all features to default values (zero). | |
void | exitErr (char *msg, char *str, int ErrNum) |
prints and error message and exits the program. More... | |
PHON_MANNER | classify_german (char *phone) |
categorizes the phones (language dependend). More... |
|
categorizes the phones (language dependend).
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 } |
|
prints and error message and exits the program.
example: exitErr("classify_german: %s: no such Phone
01517 { 01518 fprintf(stderr, "ERROR: "); 01519 fprintf(stderr, msg, str); 01520 exit(ErrNum); 01521 } |
|
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 } |