git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@245 d46cf337-b52f-0410-862d-fd96e6ae7743master
// PB = Peter Bjarkov - [email protected] | |||||
// PB = Peter Bjarkov - [email protected] | |||||
// This file is UTF8 encoded | // This file is UTF8 encoded | ||||
// Spelling-to-phoneme words for Danish | // Spelling-to-phoneme words for Danish | ||||
_2X t'y:w | _2X t'y:w | ||||
_3X tR'&#Dv@ //PB [tR'ADv@] changed to [tR'&#Dv@] | _3X tR'&#Dv@ //PB [tR'ADv@] changed to [tR'&#Dv@] | ||||
_4X f'WRV //PB [f'W:*3] changed to [ f'WRV] | _4X f'WRV //PB [f'W:*3] changed to [ f'WRV] | ||||
_5X hal't*es | |||||
_5X h&l't*es // PB [a] changed to [&] | |||||
_6X t*'es | _6X t*'es | ||||
_7X halfj'&rs | _7X halfj'&rs | ||||
_8X f'irs | _8X f'irs | ||||
et ed $u | et ed $u | ||||
her $u | her $u | ||||
kun $u | kun $u | ||||
vel $u+ | |||||
// conjunctions | // conjunctions | ||||
og V $u+ $pause // and | og V $u+ $pause // and | ||||
af & // PB changed from [a?] to [&] - sound too short in a sentence | af & // PB changed from [a?] to [&] - sound too short in a sentence | ||||
// Also removed $u from 'af' and other words. They disappeared. | // Also removed $u from 'af' and other words. They disappeared. | ||||
ad &: // PB added 'ad' | ad &: // PB added 'ad' | ||||
ad &D $atend $sentence // PB "Det må ikke skille os ad." | |||||
at &: $u // PB changed from [at] to [&:] | at &: $u // PB changed from [at] to [&:] | ||||
hos // at - PB: removed [$u+] | hos // at - PB: removed [$u+] | ||||
som sVm // which / that - PB: removed [$u+] | som sVm // which / that - PB: removed [$u+] | ||||
vi $u | vi $u | ||||
i _i $u+ | i _i $u+ | ||||
mig maj $u // me | mig maj $u // me | ||||
dig daj $u | |||||
dig daj_| $u | |||||
dem $u | dem $u | ||||
ham $u | ham $u | ||||
hende $u | hende $u | ||||
penthouse _^_EN | penthouse _^_EN | ||||
pickup _^_EN | pickup _^_EN | ||||
pidgin _^_EN | pidgin _^_EN | ||||
producer _^_EN | |||||
ranger _^_EN | ranger _^_EN | ||||
receiver _^_EN | receiver _^_EN | ||||
research _^_EN | research _^_EN | ||||
remake _^_EN | remake _^_EN | ||||
roadie _^_EN | roadie _^_EN | ||||
roastbeef _^_EN | |||||
run _^_EN | run _^_EN | ||||
scanner _^_EN | scanner _^_EN | ||||
science _^_EN | science _^_EN | ||||
snob _^_EN | snob _^_EN | ||||
song _^_EN | song _^_EN | ||||
source _^_EN | source _^_EN | ||||
spam _^_EN | |||||
spirit _^_EN | spirit _^_EN | ||||
squaw _^_EN | squaw _^_EN | ||||
sweatshirt _^_EN | sweatshirt _^_EN | ||||
magasin $alt | magasin $alt | ||||
mandarin $alt | mandarin $alt | ||||
mandolin $alt | mandolin $alt | ||||
mannequin m&n@k'EN $alt | |||||
margin $alt | margin $alt | ||||
marin $alt | marin $alt | ||||
marocain mAro'kEN $alt | marocain mAro'kEN $alt | ||||
adviser $alt | adviser $alt | ||||
advoker $alt | advoker $alt | ||||
afficer $alt | afficer $alt | ||||
aflever $alt | |||||
afmarcher $alt | afmarcher $alt | ||||
afrikaniser $alt | afrikaniser $alt | ||||
agere $alt | agere $alt | ||||
brunere $alt | brunere $alt | ||||
brutaliser $alt | brutaliser $alt | ||||
bruyere bryj'E:r $alt | bruyere bryj'E:r $alt | ||||
budgetter $alt | |||||
budgettere $alt | |||||
bugser $alt | bugser $alt | ||||
bureaukratiser $alt | bureaukratiser $alt | ||||
cadmier $alt | cadmier $alt | ||||
dereguler $alt | dereguler $alt | ||||
deriver $alt | deriver $alt | ||||
desarmer $alt | desarmer $alt | ||||
deserter $alt | |||||
desertere $alt | |||||
designere $alt | designere $alt | ||||
desinficer $alt | desinficer $alt | ||||
destiller $alt | destiller $alt | ||||
fasciner $alt | fasciner $alt | ||||
favoriser $alt | favoriser $alt | ||||
feminiser $alt | feminiser $alt | ||||
ferier $alt | |||||
feriere $alt | |||||
fermenter $alt | fermenter $alt | ||||
ferniser $alt | ferniser $alt | ||||
fertiliser $alt | fertiliser $alt | ||||
lancer $alt | lancer $alt | ||||
lasere $alt | lasere $alt | ||||
latiniser $alt | latiniser $alt | ||||
//lavere $alt | |||||
lavpasteuriser $alt | lavpasteuriser $alt | ||||
legaliser $alt | legaliser $alt | ||||
leger $alt | leger $alt | ||||
planere $alt | planere $alt | ||||
plastificer $alt | plastificer $alt | ||||
platiner $alt | platiner $alt | ||||
pletter $alt | |||||
plettere $alt | |||||
plisser $alt | plisser $alt | ||||
plomber $alt | plomber $alt | ||||
plæder $alt | plæder $alt | ||||
prober $alt | prober $alt | ||||
problematiser $alt | problematiser $alt | ||||
proceder $alt | proceder $alt | ||||
producer $alt | |||||
producere $alt | |||||
profaner $alt | profaner $alt | ||||
professionaliser $alt | professionaliser $alt | ||||
profeter $alt | profeter $alt | ||||
ranger $alt | ranger $alt | ||||
rappeller $alt | rappeller $alt | ||||
rapportere $alt | rapportere $alt | ||||
raser $alt | |||||
rasere $alt | |||||
ratificer $alt | ratificer $alt | ||||
ratihaber $alt | ratihaber $alt | ||||
rationaliser $alt | rationaliser $alt | ||||
reinvester $alt | reinvester $alt | ||||
rejicer $alt | rejicer $alt | ||||
rekapituler $alt | rekapituler $alt | ||||
reklamer $alt | |||||
reklamere $alt | |||||
rekognoscer $alt | rekognoscer $alt | ||||
rekommander $alt | rekommander $alt | ||||
rekompenser $alt | rekompenser $alt | ||||
staffer $alt | staffer $alt | ||||
stagner $alt | stagner $alt | ||||
standardiser $alt | standardiser $alt | ||||
stationer $alt | |||||
stationere $alt | |||||
statuere $alt | statuere $alt | ||||
stenciler $alt | stenciler $alt | ||||
stenografer $alt | stenografer $alt | ||||
termografer $alt | termografer $alt | ||||
terrasser $alt | terrasser $alt | ||||
terroriser $alt | terroriser $alt | ||||
testamenter $alt | |||||
testamentere $alt | |||||
testere $alt | testere $alt | ||||
tiere $alt | tiere $alt | ||||
titrer $alt | titrer $alt | ||||
verificer $alt | verificer $alt | ||||
verser $alt | verser $alt | ||||
versificer $alt | versificer $alt | ||||
versioner $alt | |||||
versionere $alt | |||||
vibrer $alt | vibrer $alt | ||||
vidimer $alt | vidimer $alt | ||||
vikarier $alt | vikarier $alt | ||||
(vi steg) vi||st'e | (vi steg) vi||st'e | ||||
(de steg) di||st'e | (de steg) di||st'e | ||||
(alle steg) &l3||st'e | (alle steg) &l3||st'e | ||||
steg sdaj $atend $sentence | |||||
steget ste@d | steget ste@d | ||||
// PB problem with noun "hav" = ocean and verb "hav(e)" = to have [hAu]/[h&v] | // PB problem with noun "hav" = ocean and verb "hav(e)" = to have [hAu]/[h&v] | ||||
(et hav) ed||h'Au // PB "et hav" = an ocean - not "hav en god dag" - have a nice day | (et hav) ed||h'Au // PB "et hav" = an ocean - not "hav en god dag" - have a nice day |
Dictionary da_dict | Dictionary da_dict | ||||
& &# 0 3 @ @- a A | & &# 0 3 @ @- a A | ||||
e E i o O u V W | |||||
W# y Y | |||||
aI e E i o O u V | |||||
W W# y Y | |||||
* - : ? b B d D | * - : ? b B d D | ||||
dZ f g h j J k l | dZ f g h j J k l | ||||
l/2 l/3 m n N p r R | l/2 l/3 m n N p r R | ||||
s S t T tS v w | |||||
s S t T tS v w z | |||||
Dictionary hu_dict | Dictionary hu_dict |
dosage doUsI2dZ | dosage doUsI2dZ | ||||
dramatic dr@matIk | dramatic dr@matIk | ||||
drawer drO@ | drawer drO@ | ||||
dreamt drEmpt | |||||
drier draI3 | drier draI3 | ||||
driest draI|@st | driest draI|@st | ||||
duet dju:'Et | duet dju:'Et | ||||
hasty heIstI | hasty heIstI | ||||
hatred heItrI2d | hatred heItrI2d | ||||
hazardous haz3d@s | hazardous haz3d@s | ||||
headfirst $2 | |||||
heh hEh | heh hEh | ||||
hehe hi:h'i: | hehe hi:h'i: | ||||
heifer hEf@ | heifer hEf@ | ||||
prestige prEst'i:Z | prestige prEst'i:Z | ||||
?3 pretense pri:tEns | ?3 pretense pri:tEns | ||||
pretext pri:tEkst | pretext pri:tEkst | ||||
pretrial pri:tr'aI|@L | |||||
pretty prItI | pretty prItI | ||||
privation praIv'eIS@n | privation praIv'eIS@n | ||||
privilege prIvI2lI2dZ | privilege prIvI2lI2dZ | ||||
thine ,DaIn | thine ,DaIn | ||||
me ,mi: $only | me ,mi: $only | ||||
me mi: $atstart $atend | |||||
him ,hIm $only | him ,hIm $only | ||||
us ,Vz $only | us ,Vz $only | ||||
us $abbrev $allcaps | us $abbrev $allcaps |
// 2006-11-18 Gilles Casse <[email protected]> | // 2006-11-18 Gilles Casse <[email protected]> | ||||
// | // | ||||
// Updated 2010-06-11 Michel Such <[email protected]> | |||||
// Updated 2010-06-15 Michel Such <[email protected]> | |||||
// | // | ||||
// * Numbers, a few abbreviations and exceptions. | // * Numbers, a few abbreviations and exceptions. | ||||
// | // | ||||
exocet E2gzosEt | exocet E2gzosEt | ||||
fret fr'Et | fret fr'Et | ||||
budget bydZE2 | budget bydZE2 | ||||
hamlet hamlEt | |||||
hamlet _|amlEt | |||||
knesset knesEt | knesset knesEt | ||||
lazaret lazarE2 | lazaret lazarE2 | ||||
margaret margarEt | margaret margarEt | ||||
dations datjO~z2 | dations datjO~z2 | ||||
désertions dezErtjO~z2 $verb | désertions dezErtjO~z2 $verb | ||||
exploitions EksplwatjO~z2 | exploitions EksplwatjO~z2 | ||||
heurtions hYrtjO~z2 | |||||
heurtions _|WrtjO~z2 | |||||
partions partjO~z2 | partions partjO~z2 | ||||
rations ratjO~z2 $verb | rations ratjO~z2 $verb | ||||
tentions tA~tjO~z2 | tentions tA~tjO~z2 |
_) ட (வல t.V | _) ட (வல t.V | ||||
_) ட (வர t.V | _) ட (வர t.V | ||||
_) ட (ேப t. | _) ட (ேப t. | ||||
_) ட (ாக்ஸி t. | |||||
_) டாக (்ஸி t.a:k | |||||
.group ண | .group ண | ||||
ண n.V | ண n.V | ||||
_) த (ொம் d | _) த (ொம் d | ||||
_) த (ோசை d | _) த (ோசை d | ||||
_) த (ோஷ d | _) த (ோஷ d | ||||
_) த (ுபாய d | |||||
//endsort | //endsort | ||||
//sort | //sort | ||||
ச) த (்ரு t | ச) த (்ரு t | ||||
த) த (்ரூப t | த) த (்ரூப t | ||||
பா) த (்ரூம t | பா) த (்ரூம t | ||||
_ப) த (ஞ்சலி tV | |||||
//endsort | //endsort | ||||
id 15 125 | id 15 125 | ||||
sq 33 126 | sq 33 126 | ||||
hy 23 117 | hy 23 117 | ||||
da 23 119 | |||||
da 24 120 | |||||
rw 15 130 | rw 15 130 | ||||
ml 13 150 | ml 13 150 | ||||
ne 18 156 | ne 18 156 | ||||
b/xb [b] base | b/xb [b] base | ||||
[b] fr | [b] fr | ||||
[bh] hi | [bh] hi | ||||
b/xbr [b] fr | |||||
d/d [d] base | d/d [d] base | ||||
[d[] base | [d[] base | ||||
[d] base2 | [d] base2 | ||||
[d] sq | [d] sq | ||||
d/xd3 [dh] hi | d/xd3 [dh] hi | ||||
d/xd_pzd [d;] pl | d/xd_pzd [d;] pl | ||||
d/xdr [d] fr | |||||
d/xdz [dz] consonants | d/xdz [dz] consonants | ||||
d/x_tap [t#] en | d/x_tap [t#] en | ||||
[*] pt | [*] pt | ||||
[g] cy | [g] cy | ||||
[g] fr | [g] fr | ||||
[g] es | [g] es | ||||
g/xgr [g] fr | |||||
h/h_ [h] base | h/h_ [h] base | ||||
[h] fi | [h] fi | ||||
[<h>] la | [<h>] la | ||||
[a:I] vi | [a:I] vi | ||||
[aI] id | [aI] id | ||||
[aI] hy | [aI] hy | ||||
[aI] da | |||||
vdiph/ai_2 [aI] en | vdiph/ai_2 [aI] en | ||||
[aI] cy | [aI] cy | ||||
[aY] cy | [aY] cy |
ENVELOPE | |||||
0 60 | |||||
5 63 | |||||
22 92 | |||||
31 100 | |||||
41 95 | |||||
85 12 | |||||
90 5 | |||||
100 0 | |||||
ENVELOPE | |||||
0 0 | |||||
45 95 | |||||
100 0 | |||||
tune s1 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 4 80 50 -8 -5 | |||||
headextend 0 63 38 13 0 | |||||
nucleus0 fall 64 8 | |||||
nucleus fall 70 18 24 12 | |||||
endtune | |||||
tune c1 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 4 80 46 -8 -5 | |||||
headextend 0 63 38 13 0 | |||||
nucleus0 fall-rise 80 18 | |||||
nucleus fall-rise2 78 22 34 52 | |||||
endtune | |||||
tune q1 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 4 75 43 -7 0 | |||||
headextend 25 63 38 13 0 | |||||
nucleus0 fall-rise 88 22 | |||||
nucleus fall-rise2 82 22 34 66 | |||||
endtune | |||||
tune e1 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 3 90 50 -9 0 | |||||
headextend 16 82 50 32 16 | |||||
nucleus0 fall 92 8 | |||||
nucleus fall 92 80 76 8 | |||||
endtune | |||||
// PB Tunes for the Danish intonation | |||||
// full-stop "." - punktum | |||||
tune s2 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 4 65 60 -8 -5 | |||||
headextend 0 53 38 13 0 | |||||
nucleus0 fall 44 28 | |||||
nucleus fall 50 42 34 28 // sidste ord før punktu | |||||
onset 75 -5 -5 | |||||
endtune | |||||
// comma "," - komma | |||||
tune c2 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 4 65 50 -8 -5 | |||||
headextend 0 63 38 13 0 | |||||
nucleus0 rise 60 42 | |||||
nucleus rise 55 42 34 52 // sidste tal: slutniveau | |||||
endtune | |||||
// question mark "?" - spørgsmålste | |||||
tune q2 | |||||
prehead 40 75 | |||||
headenv fall 16 | |||||
head 4 75 43 -7 0 //head 4 35 43 -7 0 | |||||
headextend 25 63 38 13 0 | |||||
nucleus0 rise 70 50 // første tal: slutniveaue | |||||
nucleus rise 35 45 60 70 // sidste tal: slutniveau | |||||
endtune | |||||
// exclamation mark "!" - udråbsteg | |||||
tune e2 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 3 90 50 -9 0 | |||||
headextend 16 82 50 32 16 | |||||
nucleus0 fall 92 8 | |||||
nucleus fall 92 80 76 8 | |||||
endtune | |||||
// Tunes for the French intonation | |||||
// full-stop "." - point | |||||
tune s3 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 4 80 50 -8 -5 | |||||
headextend 0 63 38 13 0 | |||||
nucleus0 fall 64 8 | |||||
nucleus fall 70 18 24 12 | |||||
endtune | |||||
// comma "," - virgule | |||||
tune c3 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 4 80 30 -5 -15 | |||||
headextend 25 63 38 13 0 | |||||
nucleus0 fall-rise 75 40 | |||||
endtune | |||||
// question mark "?" - point d'interrogation | |||||
tune q3 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 4 75 43 -7 0 | |||||
headextend 25 63 38 13 0 | |||||
nucleus0 fall-rise 88 22 | |||||
nucleus fall-rise2 82 22 34 66 | |||||
endtune | |||||
// exclamation mark "!" - point d'exclamation | |||||
tune e3 | |||||
prehead 46 57 | |||||
headenv fall 16 | |||||
head 3 90 50 -9 0 | |||||
headextend 16 82 50 32 16 | |||||
nucleus0 fall 92 8 | |||||
nucleus fall 92 80 76 8 | |||||
endtune |
FMT(vowel/V) | FMT(vowel/V) | ||||
endphoneme | endphoneme | ||||
phoneme aI | |||||
vowel starttype #a endtype #i | |||||
length 250 | |||||
FMT(vdiph/ai) | |||||
endphoneme | |||||
// CONSONANTS | // CONSONANTS | ||||
// PB added l/3 | // PB added l/3 |
phoneme aI@ | phoneme aI@ | ||||
vowel starttype #a endtype #@ | vowel starttype #a endtype #@ | ||||
length 270 | |||||
length 280 | |||||
IfNextVowelAppend(r-) | IfNextVowelAppend(r-) | ||||
FMT(vwl_en/aI@) | FMT(vwl_en/aI@) | ||||
endphoneme | endphoneme | ||||
phoneme aU@ | phoneme aU@ | ||||
vowel starttype #a endtype #@ | vowel starttype #a endtype #@ | ||||
length 270 | |||||
length 280 | |||||
IfNextVowelAppend(r-) | IfNextVowelAppend(r-) | ||||
FMT(vwl_en/aU@) | FMT(vwl_en/aU@) | ||||
endphoneme | endphoneme |
phoneme aI@ | phoneme aI@ | ||||
vowel starttype #a endtype #@ | vowel starttype #a endtype #@ | ||||
length 270 | |||||
length 280 | |||||
IfNextVowelAppend(r-) | IfNextVowelAppend(r-) | ||||
FMT(vwl_en/aI@) | FMT(vwl_en/aI@) | ||||
endphoneme | endphoneme | ||||
phoneme aU@ | phoneme aU@ | ||||
vowel starttype #a endtype #@ | vowel starttype #a endtype #@ | ||||
length 270 | |||||
length 280 | |||||
IfNextVowelAppend(r-) | IfNextVowelAppend(r-) | ||||
FMT(vwl_en/aU@) | FMT(vwl_en/aU@) | ||||
endphoneme | endphoneme |
phoneme aI@ | phoneme aI@ | ||||
vowel starttype #a endtype #@ | vowel starttype #a endtype #@ | ||||
length 270 | |||||
length 280 | |||||
IfNextVowelAppend(r-) | IfNextVowelAppend(r-) | ||||
FMT(vwl_en/ooi@) | FMT(vwl_en/ooi@) | ||||
endphoneme | endphoneme | ||||
phoneme aU@ | phoneme aU@ | ||||
vowel starttype #a endtype #@ | vowel starttype #a endtype #@ | ||||
length 270 | |||||
length 280 | |||||
IfNextVowelAppend(r-) | IfNextVowelAppend(r-) | ||||
FMT(vwl_en/aU@) | FMT(vwl_en/aU@) | ||||
endphoneme | endphoneme |
//==================================================== | //==================================================== | ||||
// French | // French | ||||
//==================================================== | //==================================================== | ||||
// Updated 2010-06-12 Michel Such <[email protected]> | |||||
// Updated 2010-06-16 Michel Such <[email protected]> | |||||
phoneme #l virtual | phoneme #l virtual | ||||
// Used for l and l/ | // Used for l and l/ | ||||
vcd uvl frc nopause | vcd uvl frc nopause | ||||
rhotic | rhotic | ||||
starttype #r endtype #r | starttype #r endtype #r | ||||
Vowelin f1=1 f2=1600 -500 500 f3=-200 100 len=65 | |||||
Vowelout f1=1 f2=1200 -400 800 f3=200 100 len=60 | |||||
Vowelin f1=0 f2=1500 -400 400 f3=-400 80 | |||||
lengthmod 7 | lengthmod 7 | ||||
IF nextPh(isNotVowel) THEN | IF nextPh(isNotVowel) THEN | ||||
phoneme r/2 | phoneme r/2 | ||||
liquid rhotic uvl nopause | liquid rhotic uvl nopause | ||||
starttype #r endtype #r | starttype #r endtype #r | ||||
Vowelin f1=1 f2=1600 -500 500 f3=-200 100 len=65 amp=8 | |||||
Vowelin f1=0 f2=1500 -400 400 f3=-400 80 | |||||
CALL post_r | CALL post_r | ||||
IF prevPhW(f) OR prevPhW(k) OR prevPhW(p) OR prevPhW(s) OR prevPhW(t) OR prevPhW(S) THEN | IF prevPhW(f) OR prevPhW(k) OR prevPhW(p) OR prevPhW(s) OR prevPhW(t) OR prevPhW(S) THEN | ||||
phoneme l | phoneme l | ||||
liquid nopause | |||||
liquid | |||||
starttype #l endtype #l | starttype #l endtype #l | ||||
lengthmod 7 | lengthmod 7 | ||||
ENDIF | ENDIF | ||||
IF PreVoicing THEN | IF PreVoicing THEN | ||||
FMT(b/xb) | |||||
IF nextPhW(#r) THEN | |||||
FMT(b/xbr) | |||||
ELSE | |||||
FMT(b/xb) | |||||
ENDIF | |||||
ENDIF | ENDIF | ||||
IF nextPh(isPause2) OR nextPh(l) THEN | IF nextPh(isPause2) OR nextPh(l) THEN | ||||
Vowelout f1=2 f2=1700 -300 300 f3=-100 80 | Vowelout f1=2 f2=1700 -300 300 f3=-100 80 | ||||
IF PreVoicing THEN | IF PreVoicing THEN | ||||
FMT(d/xd) | |||||
IF nextPhW(#r) THEN | |||||
FMT(d/xdr) | |||||
ELSE | |||||
FMT(d/xd) | |||||
ENDIF | |||||
ENDIF | ENDIF | ||||
IF nextPh(isPause2) THEN | IF nextPh(isPause2) THEN | ||||
Vowelout f1=1 f2=2300 250 300 f3=-300 80 brk | Vowelout f1=1 f2=2300 250 300 f3=-300 80 brk | ||||
IF PreVoicing THEN | IF PreVoicing THEN | ||||
FMT(g/xg) | |||||
IF nextPhW(#r) THEN | |||||
FMT(g/xgr) | |||||
ELSE | |||||
FMT(g/xg) | |||||
ENDIF | |||||
ENDIF | ENDIF | ||||
IF nextPh(isPause2) THEN | IF nextPh(isPause2) THEN |
//==================================================== | |||||
// Nahuatl (classical) | |||||
//==================================================== | |||||
phoneme : // lengthens the previous vowel by 'length' | |||||
virtual | |||||
length 300 | |||||
endphoneme | |||||
phoneme e | |||||
vowel starttype #e endtype #e | |||||
length 170 | |||||
FMT(vowel/e_mid2) | |||||
endphoneme | |||||
phoneme u | phoneme u | ||||
vowel starttype #u endtype #u | vowel starttype #u endtype #u | ||||
length 110 | length 110 | ||||
ChangeIfNotStressed(U) | |||||
IF prevPhW(isVel) THEN | |||||
ELSE | |||||
ChangeIfNotStressed(U) | |||||
ENDIF | |||||
FMT(vowel/u_6) | FMT(vowel/u_6) | ||||
endphoneme | endphoneme | ||||
include ph_danish | include ph_danish | ||||
// The following lines are experimental, for future additions. | |||||
// These langauges are not in a usable state. | |||||
// These lines can be deleted. | |||||
phonemetable rw base2 | phonemetable rw base2 | ||||
include ph_kinyarwanda | include ph_kinyarwanda | ||||
//phonemetable mr hi | //phonemetable mr hi | ||||
//include ph_marathi | //include ph_marathi | ||||
//phonemetable eu base2 | //phonemetable eu base2 | ||||
//include ph_basque | //include ph_basque | ||||
# Makefile for 'espeak', 'speak', and 'libespeak' | |||||
# remove -fno-exceptions if it causes problems with stdio library on some platforms (ARM) | # remove -fno-exceptions if it causes problems with stdio library on some platforms (ARM) | ||||
PREFIX=/usr | PREFIX=/usr |
else | else | ||||
{ | { | ||||
// increase consonant amplitude at high speeds, depending on the peak consonant amplitude | // increase consonant amplitude at high speeds, depending on the peak consonant amplitude | ||||
x = ((35 - wav_scale) * speed.loud_consonants); | |||||
if(x < 0) x = 0; | |||||
wav_scale = (wav_scale * (x+256))/256; | |||||
// x = ((35 - wav_scale) * speed.loud_consonants); | |||||
// if(x < 0) x = 0; | |||||
// wav_scale = (wav_scale * (x+256))/256; | |||||
} | } | ||||
if(std_length > 0) | if(std_length > 0) | ||||
} // end of DoSample2 | } // end of DoSample2 | ||||
#ifdef deleted | |||||
int DoSample(PHONEME_TAB *ph1, PHONEME_TAB *ph2, int which, int length_mod, int amp) | |||||
{//====================== ========================================================== | |||||
int index; | |||||
int match_level; | |||||
int amp2; | |||||
int result; | |||||
EndPitch(1); | |||||
index = LookupSound(ph1,ph2,which & 0xff,&match_level,0); | |||||
if((index & 0x800000) == 0) | |||||
return(0); // not wavefile data | |||||
amp2 = wavefile_amp; | |||||
if(amp != 0) | |||||
amp2 = (amp * wavefile_amp)/20; | |||||
if(amp == -1) | |||||
amp2 = amp; | |||||
result = DoSample2(index,which,length_mod,0,amp2); | |||||
last_frame = NULL; | |||||
return(result); | |||||
} // end of DoSample | |||||
#endif | |||||
int DoSample3(PHONEME_DATA *phdata, int length_mod, int amp) | int DoSample3(PHONEME_DATA *phdata, int length_mod, int amp) | ||||
{//========================================================= | {//========================================================= |
/*************************************************************************** | |||||
* Copyright (C) 2005 to 2007 by Jonathan Duddington * | |||||
* email: [email protected] * | |||||
* * | |||||
* 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 * | |||||
* the Free Software Foundation; either version 3 of the License, or * | |||||
* (at your option) any later version. * | |||||
* * | |||||
* This program is distributed in the hope that it will be useful, * | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||||
* GNU General Public License for more details. * | |||||
* * | |||||
* You should have received a copy of the GNU General Public License * | |||||
* along with this program; if not, write see: * | |||||
* <http://www.gnu.org/licenses/>. * | |||||
***************************************************************************/ | |||||
#include "StdAfx.h" | |||||
static const short stress_lengths_nl[8] = {160,135, 210,210, 0, 0, 260,280}; | static const short stress_lengths_nl[8] = {160,135, 210,210, 0, 0, 260,280}; | ||||
tr->langopts.stress_rule = STRESSPOSN_1L; | tr->langopts.stress_rule = STRESSPOSN_1L; | ||||
tr->langopts.vowel_pause = 1; | |||||
tr->langopts.vowel_pause = 0x30; // ?? | tr->langopts.vowel_pause = 0x30; // ?? | ||||
tr->langopts.param[LOPT_DIERESES] = 1; | tr->langopts.param[LOPT_DIERESES] = 1; | ||||
tr->langopts.param[LOPT_PREFIXES] = 1; | tr->langopts.param[LOPT_PREFIXES] = 1; |
PaStreamCallbackFlags flags, void *userData ) | PaStreamCallbackFlags flags, void *userData ) | ||||
#endif | #endif | ||||
{ | { | ||||
int aResult=0; // paContinue | |||||
char* aWrite = myWrite; | |||||
size_t n = out_channels*sizeof(uint16_t)*framesPerBuffer; | |||||
int aResult=0; // paContinue | |||||
char* aWrite = myWrite; | |||||
size_t n = out_channels*sizeof(uint16_t)*framesPerBuffer; | |||||
myReadPosition += framesPerBuffer; | |||||
SHOW("pa_callback > myReadPosition=%u, framesPerBuffer=%lu (n=0x%x) \n",(int)myReadPosition, framesPerBuffer, n); | |||||
myReadPosition += framesPerBuffer; | |||||
SHOW("pa_callback > myReadPosition=%u, framesPerBuffer=%lu (n=0x%x) \n",(int)myReadPosition, framesPerBuffer, n); | |||||
if (aWrite >= myRead) | |||||
{ | |||||
if((size_t)(aWrite - myRead) >= n) | |||||
{ | |||||
memcpy(outputBuffer, myRead, n); | |||||
myRead += n; | |||||
} | |||||
else | |||||
{ | |||||
SHOW_TIME("pa_callback > underflow"); | |||||
aResult=1; // paComplete; | |||||
mInCallbackFinishedState = true; | |||||
size_t aUsedMem=0; | |||||
aUsedMem = (size_t)(aWrite - myRead); | |||||
if (aUsedMem) | |||||
{ | |||||
memcpy(outputBuffer, myRead, aUsedMem); | |||||
} | |||||
char* p = (char*)outputBuffer + aUsedMem; | |||||
memset(p, 0, n - aUsedMem); | |||||
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t)); | |||||
myRead = aWrite; | |||||
} | |||||
} | |||||
else // myRead > aWrite | |||||
{ | |||||
if ((size_t)(myBuffer + BUFFER_LENGTH - myRead) >= n) | |||||
if (aWrite >= myRead) | |||||
{ | { | ||||
memcpy(outputBuffer, myRead, n); | |||||
myRead += n; | |||||
if((size_t)(aWrite - myRead) >= n) | |||||
{ | |||||
memcpy(outputBuffer, myRead, n); | |||||
myRead += n; | |||||
} | |||||
else | |||||
{ | |||||
SHOW_TIME("pa_callback > underflow"); | |||||
aResult=1; // paComplete; | |||||
mInCallbackFinishedState = true; | |||||
size_t aUsedMem=0; | |||||
aUsedMem = (size_t)(aWrite - myRead); | |||||
if (aUsedMem) | |||||
{ | |||||
memcpy(outputBuffer, myRead, aUsedMem); | |||||
} | |||||
char* p = (char*)outputBuffer + aUsedMem; | |||||
memset(p, 0, n - aUsedMem); | |||||
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t)); | |||||
myRead = aWrite; | |||||
} | |||||
} | } | ||||
else if ((size_t)(aWrite + BUFFER_LENGTH - myRead) >= n) | |||||
else // myRead > aWrite | |||||
{ | { | ||||
int aTopMem = myBuffer + BUFFER_LENGTH - myRead; | |||||
if (aTopMem) | |||||
{ | |||||
SHOW("pa_callback > myRead=0x%x, aTopMem=0x%x\n",(int)myRead, (int)aTopMem); | |||||
memcpy(outputBuffer, myRead, aTopMem); | |||||
} | |||||
int aRest = n - aTopMem; | |||||
if (aRest) | |||||
{ | |||||
SHOW("pa_callback > myRead=0x%x, aRest=0x%x\n",(int)myRead, (int)aRest); | |||||
char* p = (char*)outputBuffer + aTopMem; | |||||
memcpy(p, myBuffer, aRest); | |||||
} | |||||
myRead = myBuffer + aRest; | |||||
} | |||||
else | |||||
{ | |||||
SHOW_TIME("pa_callback > underflow"); | |||||
aResult=1; // paComplete; | |||||
int aTopMem = myBuffer + BUFFER_LENGTH - myRead; | |||||
if (aTopMem) | |||||
{ | |||||
SHOW("pa_callback > myRead=0x%x, aTopMem=0x%x\n",(int)myRead, (int)aTopMem); | |||||
memcpy(outputBuffer, myRead, aTopMem); | |||||
} | |||||
int aRest = aWrite - myBuffer; | |||||
if (aRest) | |||||
{ | |||||
SHOW("pa_callback > myRead=0x%x, aRest=0x%x\n",(int)myRead, (int)aRest); | |||||
char* p = (char*)outputBuffer + aTopMem; | |||||
memcpy(p, myBuffer, aRest); | |||||
} | |||||
size_t aUsedMem = aTopMem + aRest; | |||||
char* p = (char*)outputBuffer + aUsedMem; | |||||
memset(p, 0, n - aUsedMem); | |||||
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t)); | |||||
myRead = aWrite; | |||||
if ((size_t)(myBuffer + BUFFER_LENGTH - myRead) >= n) | |||||
{ | |||||
memcpy(outputBuffer, myRead, n); | |||||
myRead += n; | |||||
} | |||||
else if ((size_t)(aWrite + BUFFER_LENGTH - myRead) >= n) | |||||
{ | |||||
int aTopMem = myBuffer + BUFFER_LENGTH - myRead; | |||||
if (aTopMem) | |||||
{ | |||||
SHOW("pa_callback > myRead=0x%x, aTopMem=0x%x\n",(int)myRead, (int)aTopMem); | |||||
memcpy(outputBuffer, myRead, aTopMem); | |||||
} | |||||
int aRest = n - aTopMem; | |||||
if (aRest) | |||||
{ | |||||
SHOW("pa_callback > myRead=0x%x, aRest=0x%x\n",(int)myRead, (int)aRest); | |||||
char* p = (char*)outputBuffer + aTopMem; | |||||
memcpy(p, myBuffer, aRest); | |||||
} | |||||
myRead = myBuffer + aRest; | |||||
} | |||||
else | |||||
{ | |||||
SHOW_TIME("pa_callback > underflow"); | |||||
aResult=1; // paComplete; | |||||
int aTopMem = myBuffer + BUFFER_LENGTH - myRead; | |||||
if (aTopMem) | |||||
{ | |||||
SHOW("pa_callback > myRead=0x%x, aTopMem=0x%x\n",(int)myRead, (int)aTopMem); | |||||
memcpy(outputBuffer, myRead, aTopMem); | |||||
} | |||||
int aRest = aWrite - myBuffer; | |||||
if (aRest) | |||||
{ | |||||
SHOW("pa_callback > myRead=0x%x, aRest=0x%x\n",(int)myRead, (int)aRest); | |||||
char* p = (char*)outputBuffer + aTopMem; | |||||
memcpy(p, myBuffer, aRest); | |||||
} | |||||
size_t aUsedMem = aTopMem + aRest; | |||||
char* p = (char*)outputBuffer + aUsedMem; | |||||
memset(p, 0, n - aUsedMem); | |||||
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t)); | |||||
myRead = aWrite; | |||||
} | |||||
} | } | ||||
} | |||||
SHOW("pa_callback > myRead=%x\n",(int)myRead); | |||||
SHOW("pa_callback > myRead=%x\n",(int)myRead); | |||||
// #if USE_PORTAUDIO == 18 | // #if USE_PORTAUDIO == 18 | ||||
#endif | #endif | ||||
return(aResult); | |||||
return(aResult); | |||||
//#endif | //#endif | ||||
} // end of WaveCallBack | } // end of WaveCallBack |