Browse Source

[1.43.57]

Indicate language changes in IPA phoneme output.

Phoneme definitions FMT(), second parameter is amplitude percentage.

Phoneme definitions CALL(),  If phoneme type is not defined, copy the static attributes from the called phoneme.

Unpronouncable word check: stop when an apostrophe is reached.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@250 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 15 years ago
parent
commit
ebf0535e6d
85 changed files with 2295 additions and 1946 deletions
  1. 3
    1
      dictsource/da_list
  2. 8
    0
      dictsource/da_rules
  3. 63
    63
      dictsource/dict_phonemes
  4. 2
    1
      dictsource/en_list
  5. 1
    0
      dictsource/en_rules
  6. 6
    8
      dictsource/es_list
  7. 41
    16
      dictsource/es_rules
  8. 56
    53
      dictsource/fr_list
  9. 1477
    1462
      dictsource/fr_rules
  10. 15
    2
      dictsource/hu_list
  11. 13
    0
      dictsource/hu_rules
  12. 126
    7
      dictsource/nl_list
  13. 78
    29
      dictsource/nl_rules
  14. 16
    0
      dictsource/ta_rules
  15. 42
    47
      phsource/compile_report
  16. 4
    2
      phsource/ph_afrikaans
  17. 1
    0
      phsource/ph_albanian
  18. 2
    0
      phsource/ph_croatian
  19. 1
    4
      phsource/ph_english
  20. 1
    4
      phsource/ph_english_rp
  21. 5
    2
      phsource/ph_english_sc
  22. 11
    68
      phsource/ph_french
  23. 2
    1
      phsource/ph_hindi
  24. 1
    0
      phsource/ph_macedonian
  25. 1
    4
      phsource/ph_portugal
  26. 1
    3
      phsource/ph_pt_brazil
  27. 2
    1
      phsource/ph_romanian
  28. 2
    0
      phsource/ph_serbian
  29. 34
    1
      phsource/ph_spanish
  30. 1
    8
      phsource/ph_tamil
  31. 3
    0
      phsource/ph_zh
  32. 5
    1
      phsource/phonemes
  33. BIN
      phsource/vwl_fr/a2r
  34. BIN
      phsource/vwl_fr/aa2r
  35. BIN
      phsource/vwl_fr/e2r
  36. BIN
      phsource/vwl_fr/e_2r
  37. BIN
      phsource/vwl_fr/ee2r
  38. BIN
      phsource/vwl_fr/i2r
  39. BIN
      phsource/vwl_fr/o2r
  40. BIN
      phsource/vwl_fr/oo2r
  41. BIN
      phsource/vwl_fr/r@
  42. BIN
      phsource/vwl_fr/r@2
  43. BIN
      phsource/vwl_fr/r_
  44. BIN
      phsource/vwl_fr/r_@
  45. BIN
      phsource/vwl_fr/r_a
  46. BIN
      phsource/vwl_fr/r_e
  47. BIN
      phsource/vwl_fr/r_i
  48. BIN
      phsource/vwl_fr/r_n
  49. BIN
      phsource/vwl_fr/r_o
  50. BIN
      phsource/vwl_fr/r_u
  51. BIN
      phsource/vwl_fr/r_y
  52. BIN
      phsource/vwl_fr/ra
  53. BIN
      phsource/vwl_fr/raa
  54. BIN
      phsource/vwl_fr/re
  55. BIN
      phsource/vwl_fr/re2
  56. BIN
      phsource/vwl_fr/ree
  57. BIN
      phsource/vwl_fr/ri
  58. BIN
      phsource/vwl_fr/rj
  59. BIN
      phsource/vwl_fr/ro
  60. BIN
      phsource/vwl_fr/roo
  61. BIN
      phsource/vwl_fr/ru
  62. BIN
      phsource/vwl_fr/rw
  63. BIN
      phsource/vwl_fr/ry
  64. BIN
      phsource/vwl_fr/u2r
  65. BIN
      phsource/vwl_fr/y2r
  66. 69
    7
      src/compiledata.cpp
  67. 3
    0
      src/compiledict.cpp
  68. 36
    29
      src/dictionary.cpp
  69. 36
    51
      src/espeakedit.cpp
  70. 1
    1
      src/klatt.cpp
  71. 3
    9
      src/main.h
  72. 1
    1
      src/mbrowrap.cpp
  73. 10
    4
      src/menus.cpp
  74. 1
    1
      src/phoneme.h
  75. 6
    2
      src/prosodydisplay.cpp
  76. 7
    5
      src/spectdisplay.cpp
  77. 0
    1
      src/synth_mbrola.cpp
  78. 5
    5
      src/synthdata.cpp
  79. 36
    8
      src/synthesize.cpp
  80. 4
    0
      src/synthesize.h
  81. 2
    4
      src/tr_languages.cpp
  82. 12
    6
      src/translate.cpp
  83. 25
    20
      src/translate.h
  84. 2
    1
      src/transldlg.cpp
  85. 12
    3
      src/wavegen.cpp

+ 3
- 1
dictsource/da_list View File

@@ -1,4 +1,6 @@
// PB = Peter Bjarkov - [email protected]
tv $abbrev

// PB = Peter Bjarkov - [email protected]

// This file is UTF8 encoded
// Spelling-to-phoneme words for Danish

+ 8
- 0
dictsource/da_rules View File

@@ -4184,6 +4184,14 @@ uimodst) å (elig 'O // PB stressed
åre V3 // PB tåre
å (lti V // PB måltid

.group '
's (_S2 s
'er (_S3 %V
'erne (_S5 %Vn@
'ernes (_S6 %Vn@s
'et (_S3 @D


.group
$ dVlV // PB changed from [dVlar]
ñ _^_ES // PB mañana

+ 63
- 63
dictsource/dict_phonemes View File

@@ -1,7 +1,7 @@
Phonemes which are used in the *_rules and *_list files


Dictionary af_dict
Dictionary af_dict 2010-05-24

& &: 3: @ @- @L @U a
A: aI AI aU A~ E e: e@
@@ -15,7 +15,7 @@ n N n^ p r s S t
T tS v w x x2 z Z


Dictionary ca_dict
Dictionary ca_dict 2010-05-12

@ a a# aI e E E2 i
o O u U
@@ -27,7 +27,7 @@ R2 s S; t T ts tS; v
v# w z Z Z;


Dictionary cs_dict
Dictionary cs_dict 2010-07-03

@- a a: aU e e: eI eU
i i: l- o o: oU r- u
@@ -40,7 +40,7 @@ s S t tS ts v x z
Z


Dictionary cy_dict
Dictionary cy_dict 2010-05-24

@ @- @I @Y a A: aI aU
AY aY E e: eU I i: Iu
@@ -53,7 +53,7 @@ p r s S t T v w
x z


Dictionary da_dict
Dictionary da_dict 2010-07-03

& &# 0 3 @ @- a A
e E i o O u V W
@@ -65,7 +65,7 @@ l/2 l/3 m n N p r R
s S t T tS v w z


Dictionary hu_dict
Dictionary hu_dict 2010-07-17

A a: E e: i i: o o:
u u: Y y y: Y:
@@ -76,7 +76,7 @@ n^ p r R R2 s S s2
t tS ts v z Z


Dictionary de_dict
Dictionary de_dict 2010-07-03

3 3: @ @- a A A: aI
aU E E2 E: e: EI i I
@@ -89,7 +89,7 @@ n N p pF r s S t
tS ts v w x z Z


Dictionary el_dict
Dictionary el_dict 2008-12-16

@ @- a aI e i o oI
u
@@ -100,7 +100,7 @@ n^ p Q r R s s; t
T ts v x z z;


Dictionary en_dict
Dictionary en_dict 2010-07-13

0 3 3: @ @- @2 @5 @L
a a# A: A@ aa aI aI@ aU
@@ -116,7 +116,7 @@ s S t T t2 tS v w
x z Z


Dictionary eo_dict
Dictionary eo_dict 2010-05-19

@- a aI aU e eI eU i
o oI u uI
@@ -127,18 +127,18 @@ s S t T tS ts v w
x z Z


Dictionary es_dict
Dictionary es_dict 2010-07-13

a aI aU e E eI eU i
o O oI u

* ** : b B d D f
g j J J^ k l m n
N n^ p Q R R2 s t
T tS v v# w x z
N n^ p Q R R2 s S
t T tS v v# w x z


Dictionary fi_dict
Dictionary fi_dict 2009-05-01

& &i &y a a2 ai au e
ei eu ey i I ie iu iy
@@ -150,11 +150,11 @@ l m n N p r s S
s2 t v w Z


Dictionary fr_dict
Dictionary fr_dict 2010-07-18

@ @- a A~ e E E2 E:
E~ i I o O o2 o3 O~
u u: w W W~ y Y
E~ i I o O o3 O~ u
u: w W W~ y Y

- : b d dZ f g h
j k l m n N n2 n^
@@ -162,7 +162,7 @@ p p2 r r2 s S t t2
t3 tS v z Z z2 z3


Dictionary grc_dict
Dictionary grc_dict 2008-03-03

a aI aU e E EI eU EU
i o O oI OI OU u y
@@ -173,7 +173,7 @@ l m n N p R s t
T v x z


Dictionary hbs_dict
Dictionary hbs_dict 2008-12-17

& @ @2 a A a: aI aU
e E e: i I i: l- o
@@ -185,7 +185,7 @@ N n^ p r R R2 s S
t tS ts tS; v x z Z


Dictionary hi_dict
Dictionary hi_dict 2009-11-24

@ @- @2 @3 a a: aI aU
e E e: E: E~ i I i:
@@ -200,7 +200,7 @@ r. s S s. t T t. th
th. v w x z


Dictionary ta_dict
Dictionary ta_dict 2010-07-18

a a: aI aU e E e: i
I i: o o: u U u: U:
@@ -213,7 +213,7 @@ s S s. t T t. th tS
v w z z.


Dictionary hy_dict
Dictionary hy_dict 2008-12-22

@ a aI e eI i i@ o
u W y
@@ -224,7 +224,7 @@ p# r R r" s S t t#
tS ts ts# v X z Z


Dictionary id_dict
Dictionary id_dict 2010-01-07

@ a aI aU e E E2 i
o O u
@@ -235,7 +235,7 @@ r R R2 s S t tS v
w x z


Dictionary is_dict
Dictionary is_dict 2010-04-05

@- a a: aI aI: aU aU: E
E: eI eI: i I i: I: O
@@ -249,7 +249,7 @@ n^# p Q r R r# R2 s
S s2 t T tl# v x z


Dictionary it_dict
Dictionary it_dict 2009-04-03

@- a a/ aI aU e E eI
i I o O u
@@ -260,7 +260,7 @@ n^ p r R s S t tS
ts v w w2 z


Dictionary jbo_dict
Dictionary jbo_dict 2010-02-16

@ a aI aU e eI i l-
n- o oI r- u
@@ -270,7 +270,7 @@ l m n N p R s S
t tS v w x z Z


Dictionary ku_dict
Dictionary ku_dict 2008-04-14

8 a e E E# eI eU i
I o u U y
@@ -281,7 +281,7 @@ q r R s S t tS v
w x z Z


Dictionary la_dict
Dictionary la_dict 2008-01-15

@- a a: aI aU E e: EU
I i: O o: OI U u: y
@@ -292,7 +292,7 @@ g h j k l m n N
p r R s t w z


Dictionary lv_dict
Dictionary lv_dict 2010-03-12

a a: ai au e e: ei i
i: ie iu o o: u u: ui
@@ -304,7 +304,7 @@ n^ p r R R2 s S t
tS ts v z Z


Dictionary mk_dict
Dictionary mk_dict 2007-12-19

& @ @- @2 a A a: e
E e: i I i: l- o o:
@@ -316,7 +316,7 @@ N n^ p r R s S t
tS ts tS; v x z Z


Dictionary nci_dict
Dictionary nci_dict 2010-01-20

a e i o O

@@ -325,19 +325,19 @@ k l m n p R s S
t tS v w x


Dictionary nl_dict
Dictionary nl_dict 2010-07-18

8 @ @- A a: A~ E e:
EI eU i I O O: o: u
VU Wy y Y: yU

* : ; b d f g h
j k l m n N n^ p
Q r s S t tS v v#
w x z
* : ; b d D f g
h j k l m n N n^
p Q r s S t tS v
v# w x z Z


Dictionary no_dict
Dictionary no_dict 2010-01-20

@ @2 a A a: A: AI aI
aU E E: e: I i: O o:
@@ -349,7 +349,7 @@ k l m n N p r R
s S s; t v w x z


Dictionary pap_dict
Dictionary pap_dict 2009-05-02

a a/ aI e E eI i o
O u y Y
@@ -360,7 +360,7 @@ R s S t tS v w x
z Z


Dictionary pl_dict
Dictionary pl_dict 2009-10-19

a E E# E~ i O O~ u
y
@@ -372,7 +372,7 @@ s; S; t t; tS ts tS; v
w x z Z Z;


Dictionary pt_dict
Dictionary pt_dict 2010-07-03

& &/ &U~ &~ @ @- a A
aI aU e E eI EI eU EU
@@ -386,7 +386,7 @@ S s# s; t T tS ts v
w x z Z


Dictionary ro_dict
Dictionary ro_dict 2010-03-12

@ @- @I @U a aI aU e
ea eI eo eU i i/ I^ iI
@@ -401,7 +401,7 @@ ts; v v; w w2 x z Z
z; Z;


Dictionary ru_dict
Dictionary ru_dict 2010-03-13

8 @- a A e E E# E2
E3 i I I# I2 I3 I^ ja
@@ -415,7 +415,7 @@ t; ts tS; v x z Z z;
Z;


Dictionary sk_dict
Dictionary sk_dict 2010-03-12

& @- a a: e e: i i:
l- l: o o: oU r- r: u
@@ -428,7 +428,7 @@ S t t; tS ts v x z
Z


Dictionary sq_dict
Dictionary sq_dict 2008-12-22

@ @/ a A a/ aI e E
eI i I I# O OI u V
@@ -441,7 +441,7 @@ R2 s S t T tS ts v
w z Z


Dictionary sv_dict
Dictionary sv_dict 2010-05-28

8 @ a A: E E- e: E:
I i: O o: U u- u: W
@@ -452,7 +452,7 @@ k l m n N p R s
S s. S; sx t v w z


Dictionary sw_dict
Dictionary sw_dict 2008-11-27

@- a a/ e i m- n- N-
o u
@@ -463,10 +463,10 @@ p Q R s S t T tS
v w x z


Dictionary sl_dict
Dictionary sl_dict 2010-07-14

& @ a e E i o O
u y
@ a a: e E e: i i:
o O o: u u: y

: b d dZ dz f g h
j k l l^ m n N n^
@@ -474,7 +474,7 @@ p R R^ s S t tS ts
v w x z Z


Dictionary tr_dict
Dictionary tr_dict 2010-06-02

@ a e E i I o O
u U W y Y
@@ -485,7 +485,7 @@ p Q r R s S t tS
v w z Z


Dictionary vi_dict
Dictionary vi_dict 2010-05-11

@ @: @:I @:U @I @U a a:
a:I a:U aI aU e E eU EU
@@ -498,7 +498,7 @@ p Q r s s. t t[ tS;
v w x z Z z.


Dictionary zh_dict
Dictionary zh_dict 2010-06-29

@ @r a A ai Au E ei
i i. i[ iA iE io iou N-
@@ -512,7 +512,7 @@ S; t th ts ts. ts. tS; tS;
tsh v w x X z.


Dictionary zhy_dict
Dictionary zhy_dict 2009-01-19

a aa aai aan aau ai au e
ei eo eoi eu i iu o oe
@@ -523,7 +523,7 @@ l m n N p r s t
tS v w z


Dictionary am_dict
Dictionary am_dict 2010-01-17

@ a e i o u y

@@ -531,7 +531,7 @@ b d h l m q R s
S t tS


Dictionary ml_dict
Dictionary ml_dict 2009-10-10

a a: aI aU e E e: i
I i: o o: r- u u: V
@@ -545,7 +545,7 @@ S; t t. th th. tS v w
z z.


Dictionary ne_dict
Dictionary ne_dict 2008-12-16

@ @/ @2 @3 a aI aU a~
e E eI eU e~ E~ i I
@@ -561,7 +561,7 @@ s S s. t T t. th v
w x z z.


Dictionary pa_dict
Dictionary pa_dict 2009-11-24

@ a a~ e E e~ E~ i
I i~ I~ o O O~ o~ r-
@@ -575,7 +575,7 @@ s S t t. th th. v x
z


Dictionary prs_dict
Dictionary prs_dict 2009-12-01

@ A E eI i o u

@@ -584,7 +584,7 @@ k l m n p r R s
S t tS v w X z Z


Dictionary rw_dict
Dictionary rw_dict 2008-03-27

a e i o u

@@ -594,7 +594,7 @@ N n^ p q R s S S;
t tS v w x z


Dictionary ur_dict
Dictionary ur_dict 2009-12-02

@ a a: aI aU E e: i
I i: O o: U u:
@@ -607,7 +607,7 @@ s. t T t. th th. v x
z Z z.


Dictionary bg_dict
Dictionary bg_dict 2010-05-19

@ a e i o u

@@ -617,7 +617,7 @@ n^ p r s S s; t t;
tS ts v x z Z z;


Dictionary nso_dict
Dictionary nso_dict 2010-05-26

@ a e i m- n- N- o
u
@@ -628,7 +628,7 @@ N n^ p Q r R R3 s
S t T tS v w x z


Dictionary ht_dict
Dictionary ht_dict 2010-06-29

a A~ e E E~ i o O
O~ u w y

+ 2
- 1
dictsource/en_list View File

@@ -3015,6 +3015,7 @@ has haz $allcaps
hath %haT $pastf $only
had %ha#d $pastf $strend2 $only
had ,had $atend
(had to) h%adt@5
(had to) hadtu: $atend
(had been) %ha#d%bIn $pastf
having ,havI2N $strend2 $pastf $only
@@ -3047,7 +3048,7 @@ didn't dIdnt $verbf
done dVn

make m,eIk $strend2 $only
made m,eId $strend2 $only
made m,eId $strend2 $only $u+

putting pUtI2N
put ,pUt $onlys $strend2

+ 1
- 0
dictsource/en_rules View File

@@ -2440,6 +2440,7 @@
for (bid f@
for (bad f@
for (see f%O@
for (ward f'o@ // straightforward
ft (en f

.group g

+ 6
- 8
dictsource/es_list View File

@@ -83,28 +83,28 @@ _5 T'inko
_6 s'eIs
_7 sj'ete
_8 'OtSo
_9 nw'eve
_9 nw'eBe
_1X dj'ET
_11 'OnTe
_12 d'oTe
_13 t**'eTe
_14 kat'ORTe
_15 k'inTe
_20 v'eInte
_2X v'eInt
_20 b'eInte
_2X b'eInt
_3X t**'eInta
_4X kwa*'Enta
_5X Tinkw'Enta
_6X sEs'Enta
_7X sEt'Enta
_8X OtS'Enta
_9X nOv'Enta
_9X nOB'Enta
_0C Tj'EntOs
_1C0 T'ien // exactly one hundred
_1C T'iento
_5C kinj'EntOs
_7C s,eteTj'EntOs
_9C n,OveTj'EntOs
_9C n,OBeTj'EntOs
_0M1 m'il
_1M1 m'il // no '1' before thousand
_0M2 miJ^'ones
@@ -119,7 +119,7 @@ _0and i
_dpt koma
//_roman Rom'ano

vi vi // not a Roman number
vi bi // not a Roman number


// articles
@@ -381,8 +381,6 @@ _a a
a a $atend
_o o
o o $atend
v uve
x Ekis
_y ,ig**'iEQa
y ,ig**'iEQa $atend
ch tSe

+ 41
- 16
dictsource/es_rules View File

@@ -5,8 +5,11 @@
// ?1 Castilian
// ?2 Latin America

.L01 j w l r d g n m
.L01 j w l r b d g n m p t k c
.L02 b d g n m // change [s] to [z] before these
.L03 f h j s y z // allow [B] [D] [Q] before these consonants
.L04 b v f p // labials, nasals are [m]
.L05 g k // velars, nasals are [N]

.group a
a a
@@ -18,11 +21,13 @@


.group b
b B
_) b b
b b
_) b b // phoneme definition may change it to [B]
b (A B
b (cY B
b (L03 B
m) b b
n) b b
b (L01 b
b (iA b
b (uA b

@@ -33,10 +38,14 @@


.group d
d D
_) d d
d d
_) d d // phoneme definition may change it to [D]
d (A D
d (cY D
d (L03 D
m) d d
n) d d
l) d d
r) d d


@@ -58,12 +67,14 @@


.group g
g Q
_) g g
g g
_) g g // phoneme definition may change it to [Q]
g (A Q
g (cY Q
g (L03 Q
m) g g
n) g g
g (Y+ x // ge gi
g (r g


.group h
@@ -92,18 +103,23 @@
?2 A) ll (A j:



.group m
m m
m (K n
m (L04 m
m (_L04 m
m (L05 N
m (_L05 N
m (j N


.group n
n n
n (b m
n (v m
n (f m
n (p m
n (g N // ??
n (k N // ??
n (L04 m
n (_L04 m
n (L05 N
n (_L05 N
n (j N


@@ -121,6 +137,10 @@
.group p
p p
p (t p:
_) ph f
ph (K f
_) ps (ico s
_) ps (eudo s


.group q
@@ -145,10 +165,15 @@
.group s
s s
&) s (_S1 s
_) s (C Es
_) sh S
sh (K S


.group t
t t
_) th T
th (K T


.group u
@@ -163,7 +188,7 @@

.group v
v B
_) v v#
_) v b
?1 m) v b
?1 n) v b
?1 v (L01 b

+ 56
- 53
dictsource/fr_list View File

@@ -24,7 +24,7 @@

// 2006-11-18 Gilles Casse <[email protected]>
//
// Updated 2010-06-22 Michel Such <[email protected]>
// Updated 2010-07-16 Michel Such <[email protected]>
//
// * Numbers, a few abbreviations and exceptions.
//
@@ -111,12 +111,12 @@ _" gijmE2
_# djEz
_' apostr'Of

_( 'uvr@-parA~t'Ez
_) f'Erm parA~t'Ez
_( parA~tEz_goS
_) parA~tEz_drwat
_, virgyl
_- tirE2
_. _|pw%E~
_/ bar||oblik
_/ barOblik
_: d'Y||pw'E~
_; pwE~||virg'yl
_< E~feriWr
@@ -124,15 +124,15 @@ _= egal
_> syperiWr
_? pwE~||dE~tE2rogasj'O~
_! pwE~||dEksklamasj'O~
_[ uvr@-_kroSE2
_\ b'aksl'aS
_] f'Erm_kroS'E2
_[ krOSE2_goS
_\ barOblik_E~vErse
_] krOSE2_drwa
_^ sirkO~flEks
__ sulin^e
_` aks'A~_gr'av
_{ uvr_akolad
_{ akOlad_goS
_| bar_vErtik'al
_} f'Erm_akol'ad
_} akOlad_drwat
² pyis'A~s||d'Y
_« uvre||gijm'E2
_» fErme||gijm'E2
@@ -165,9 +165,9 @@ _& _e_komErsi'al

// numeric

_0 zero2 $u+
_0 zero $u+
_1 W~
_2 d@z2
_2 dYz2
_3 trwaz2
_4 katr
_5 sE~k
@@ -179,7 +179,7 @@ _10 diz3
_11 _|O~z
_12 duz
_13 trEz
_14 katorz
_14 katOrz
_15 kE~z
_16 sEz
_17 disEt
@@ -214,6 +214,7 @@ _0M2 miljO~
_0M3 miljar
_0and e
_dpt virgyl
_roman rom'E~

//some numbers have special pronunciation in Belgium and Switzerland
?2 _7X sEptA~t
@@ -250,7 +251,7 @@ cci $abbrev
cia $abbrev
cio $abbrev
cm centimètre $text
collins kolins
collins kOlins
cpu $abbrev
ctrl _::kO~trOl
dept depart@mA~
@@ -303,7 +304,7 @@ pci $abbrev
pcmcia $abbrev
pda $abbrev
philips filips
p.s postskriptom
p.s pOstskriptOm
qq quelque $text
qqs quelques $text
ratp $abbrev
@@ -370,7 +371,7 @@ avant $u+
après aprEz2 $u+
(temps en temps) tA~zA~tA~
ainsi $u+
alors alor $u+
alors alOr $u+
aussi $u+
encore $u+
enfin $u+
@@ -380,7 +381,7 @@ lors $u+

certes $u+
dont dO~t2 $u
lorsque lorsk=@ $u+
lorsque lOrsk=@ $u+
puisque pyisk=@ $u+
presque prEsk=@ $u+
que $u+
@@ -423,16 +424,16 @@ ce $u+ $nounf
ceci $u+ $verbf
cela $u+ $verbf
voici $u+
voila $u+
voilà $u+
cet $u $nounf
cette $u $nounf
ces sez2 $u $nounf
(celle ci) sEl||si $verbf
(celle la) sEl||la $verbf
(ceux ci) sY||si $verbf
(ceux la) sY||la $verbf
(celles ci) sEl||si $verbf
(celles la) sEl||la $verbf
(celle ci) sEl||si $verbf $u+
(celle là) sEl||la $verbf $u+
(ceux ci) sY||si $verbf $u+
(ceux là) sY||la $verbf $u+
(celles ci) sEl||si $verbf $u+
(celles là) sEl||la $verbf $u+
plupart $u+

// possessives
@@ -465,7 +466,7 @@ du $u $nounf
des dez2 $u $nounf


//à a $u
à a $u+
au $u $nounf
aux $u $nounf

@@ -519,7 +520,7 @@ oui _|wi $u+
quand kA~t2 $u+
quoi $u+
où $u+
comme kom $u+
comme kOm $u+
comment $u+
pourquoi $u+
pourtant $u+
@@ -656,17 +657,17 @@ buffer bYfYr
bus bys
bus by $verb
cancer kA~sEr
canyon kanjon
canyon kanjOn
charles Sarl
(chef d'oeuvre) chédeuvre $text
(chef d'oeuvres) chédeuvres $text
choeur kYr
choeur kWr
cinema sinema
cocus koky
cocus kOky
couscous kuskus
delete _^_en
dernier dErnjer2
doppler doplEr
doppler dOplEr
dot dOt
éloquent elokA~t2
enfer A~fEr
@@ -676,24 +677,24 @@ fier fjer $verb
for $u+
francis frA~sis
fred frEd
free frI
free frI:
fuel fjul
gangster gA~gstEr
gars ga
genesis Zenezis
georges ZorZ
georges ZOrZ
gilles Zil
gin dZin
gulf gYlf
gulf gWlf
gus gys
gym Zim
hélas elas $u+
jacques Zak
karaoke karaoke
karaoke karaOke
kevin kevin
laetitia letisja
laser lazEr
listbox listboks
listbox listbOks
louis lwi
malus malys
mai mE2
@@ -714,10 +715,10 @@ pataquès patakEs
patchwork patSwWrk
peter pItWr
phallus falys
polder poldEr
polder pOldEr
premier pr@mjer2
program _^_en
(program files) programfajlz
(program files) prOgramfajlz
query kueri
queries kueri
quid kwid $u+
@@ -761,7 +762,7 @@ azimut azim'yt
brut br'yt
but by $verb
but byt
cut kYt
cut kWt
mazout mazut
michael mikaEl
out aut
@@ -769,14 +770,14 @@ rut ryt
scorbut scorbutt $text
scout skut
stout staut
uppercut ypErkyt
uppercut ypErkWt
ut yt
zut zyt


// et (t is said)

exocet E2gzosEt
exocet E2gzOsEt
fret fr'Et
budget bydZE2
hamlet _|amlEt
@@ -784,7 +785,7 @@ knesset knesEt
lazaret lazarE2
margaret margarEt
net nEt
offset ofsEt
offset OfsEt
set sEt
soviet soviEt
stewart stIwart
@@ -796,7 +797,7 @@ yoghourt _|iogurt
yogourt _|iogurt

// ort (t said)
short Sort
short SOrt

// art (t said)
steward stiwart
@@ -806,8 +807,8 @@ kart kart
smart smart

// irt
(sweat shirt) swEtSYrt
(sweat shirts) swEtSYrt
(sweat shirt) swEtSWrt
(sweat shirts) swEtSWrt
(tee shirt) t,IS'Wrt
(tee shirts) t,IS'Wrt
(t shirt) t,IS'Wrt
@@ -821,7 +822,7 @@ and _^_en
amazon amaz'On
apple _^_en
at at $u+
(audible manager) od,ibl||manadZ'Yr
(audible manager) od,ibl||manadZ'Wr
bin bin
bit bit
bluetooth blut'us
@@ -830,13 +831,13 @@ computer _^_en
debian debjan
edit _^_en
emacs E2maks
emacspeak E2makspIk
emacspeak E2makspI:k
end _^_en
espeak @spIk
espeak @spI:k
ethernet etErnEt
exit egzit
(file zilla) f,ajl||zij'a
from frOm $u
from frOm $u+
get _^_en
google gug=Wl
gnome gnOm
@@ -847,7 +848,7 @@ hot _^_en
in in $u+
inside _^_en
internet E~tErn'Et
(internet explorer) E~tErn'Et||E2ksplor'Wr
(internet explorer) E~tErn'Et||E2ksplOr'Wr
klaxon klaksOn
let _^_en
lite _^_en
@@ -889,7 +890,7 @@ heurtions _|WrtjO~z2
partions partjO~z2
rations ratjO~z2 $verb
tentions tA~tjO~z2
votions votjO~z2
votions vOotjO~z2
étions etjO~z2
évitions evitjO~z2

@@ -908,6 +909,7 @@ bayeux bajY
bélarus belarys
belize beliz
bissau bisa'o
brazzaville brazavil
(burkina faso) burkina||faso
burundi burundi
calvados calvadoss $text
@@ -919,8 +921,8 @@ guatemala gwatemala
hindi _|indi
honduras _|O~dyras
kenya kenja
laos laos
lesotho lezoto
laos laOs
lesotho lezOto
liechtenstein liStWnStajn
angeles A~nZelEs
malawi malawi
@@ -930,10 +932,10 @@ montserrat mO~sera
nevis nevis
niger niZEr
oman oman
palaos palaos
palaos palaOs
samoa samoa
swaziland swazilA~d
leone leon
leone leOn
koweït kowEjt
taïwan tajwan
texas tE2ks'as
@@ -944,3 +946,4 @@ venezuela venezy-E2la
wallis walis
futuna futuna
zimbabwe zimbabwe


+ 1477
- 1462
dictsource/fr_rules
File diff suppressed because it is too large
View File


+ 15
- 2
dictsource/hu_list View File

@@ -82,7 +82,7 @@ _30o hAR2_mintsAdik
_60o hAtvAnAdik
_80o n^oltsvAnAdik
_0Co sa:zAdik
_2Co ke:tsa:zAdik
_2Co ke:t|sa:zAdik
_0M1o EzR2Edik
_1M1o EzR2Edik
_2M1o ke:tEzR2Edik
@@ -150,6 +150,13 @@ _#-énél e:ne:l $alt2
_#-ik || //This is not a mistake. This is a special ordinal number suffix, with not need insert replace word suffix. For example:
//If a string containing the 17-ik string, need spokening tizenhetedik phoneme. If the suffix rule not containing the || rule but containing another
//replace word, the spokened suffix is mistaked, for example tizenhetedikedik if this rule containing the Edik phoneme, not || phoneme.
_#-iki i
_#-ike E
_#-ikei Ei
_#-ika A
_#-ikai Ai
_#-éhez e:hEz
_#-ához a:hoz
(1-e) elseje $text $alt2
(1-én) elsején $text $alt2
(1-jén) elsején $text $alt2
@@ -175,6 +182,10 @@ _#-ik || //This is not a mistake. This is a special ordinal number suffix, with
(1-vel) elsejével $text $alt2
(1-jénél) elsejénél $text $alt2
(1-énél) elsejénél $text $alt2
(1-iki) elsejei $text $alt2
(1-ike) elseje $text $alt2
(1-ikei) elsejei $text $alt2
(1-éhez) elsejéhez $text $alt2
(2-i) másodikai $text $alt2
(2-ig) másodikáig $text $alt2
(3-i) hAR2_mAdikAi $alt2
@@ -219,6 +230,8 @@ _#-ik || //This is not a mistake. This is a special ordinal number suffix, with
(0-áson) nul:a:Son
(0-tól) nul:a:to:l
(00-tól) nul:Anul:a:to:l
(0-n) nul:a:n
(00-n) nul:Anul:a:n
(1-gyet) EJ:Et
(1-gyes) EJ:ES
(2-őt) kEt:Y:t
@@ -234,6 +247,7 @@ _#-ik || //This is not a mistake. This is a special ordinal number suffix, with
(3-adikon) hAR2mAdikon //special exception
(3-adikkal) hAR2mAdik:Al //special exception
(3-t) ha:R2mAt
(3-mas) ha:R2mAS
//4 number suffixes
(4-el) ne:J:El //Nneed J: phoneme, not J phoneme contains one suffix)
(4-gyel) ne:J:El //Need J: phoneme, not J phoneme
@@ -280,7 +294,6 @@ _20e hus
(80-al) n^oltsvAn:Al
(90-el) kilEntsvEn:El


// These words mean that a dot after number, immediately preceding, does not mean an ordinal number
január $alt
február $alt

+ 13
- 0
dictsource/hu_rules View File

@@ -208,6 +208,12 @@ menetren) dsz (erű d|s
va) d (szeder d
twee) d (sapk d
fe) dd (hetetlen d
ezre) d (segé d
erő) d (szerű d
csalá) d (szociol d
száza) d (szemle d
zöl) d (szem d


.group dz
fogó) dz (kod ts
@@ -244,6 +250,9 @@ titkoló) dz z
ringató) dz z
mére) dz (k ts
pilóta) dzs (ek dZ
ezre) dz (ene d|z
száza) dz (ene d|z
honvé) dz (ászló d|z

.group e
e E
@@ -516,6 +525,7 @@ keresztü) l (j l
_) e) lj (ár lj
ha) ll (ga l
_ta) lj (án lj
_fé) l (jobb l



@@ -587,6 +597,7 @@ teljesítmé) ny (javu n^
ajá) nl l:
_feddhetetle) n (jelle n
állomá) ny (jel n^
ingatla) n (jog n

.group o
o o
@@ -662,6 +673,7 @@ gyalogo) s (zászló S
ki) s (zsidó S
szennye) s (zsá S
alvá) s (zavar S
magatartá) s (zavar S

.group ss
ssz ss2
@@ -1072,6 +1084,7 @@ fejeze) t (cím t
pán) t (szél t
boo) t (sorrend t
_á) t (jöj t
ú) tsz (oros t|s

.group ts
ts (_S2 tS //general rule with word end of ts letters

+ 126
- 7
dictsource/nl_list View File

@@ -5,7 +5,6 @@
// If a letter has a "word" pronunciation which is different from its
// "letter" name, then include the letter name here, with the letter
// prefixed by a _ character.

b be:
c se:
d de:
@@ -294,25 +293,147 @@ werd $u

// Pronounce as English
delete _^_EN
down _^_EN
//down _^_EN
escape _^_EN
home _^_EN
game _^_EN
homepage _^_EN
items _^_EN
laptop _^_EN
page _^_EN
(page down) _^_EN
(page up) _^_EN
player _^_EN
slash _^_EN
speak _^_EN
the _^_EN
the D@
up _^_EN


// words where -eren is not a stressed verb ending

achter $alt
achterkleinkinder $alt
ader $alt
ander $alt
anker $alt
badder $alt
bagger $alt
baker $alt
beender $alt
belemmer $alt
beter $alt
bibber $alt
bladder $alt
blader $alt
blaker $alt
blikker $alt
blubber $alt
blunder $alt
bolder $alt
bolster $alt
boter $alt
buffer $alt
bulder $alt
bulldozer $alt
bumper $alt
bunker $alt
cijfer $alt
donder $alt
dwater $alt
eier $alt
ender $alt
filter $alt
geester $alt
gemoeder $alt
hamer $alt
hoender $alt
jakker $alt
jammer $alt
kalver $alt
kanker $alt
kaver $alt
kinder $alt
kladder $alt
klodder $alt
koekeloer $alt
kommer $alt
kuier $alt
lammer $alt
laster $alt
lazer $alt
lebber $alt
leder $alt // gelederen
leger $alt
ler $alt
letter $alt
lever $alt
lieder $alt
lubber $alt
luister $alt
modder $alt
moeder $alt
monster $alt
nader $alt
nummer $alt
ouder $alt
pantser $alt
peiger $alt
peuter $alt
pleister $alt
poeder $alt
poeier $alt
polder $alt
rader $alt
raster $alt
redder $alt
ridder $alt
runder $alt
schilder $alt
slenter $alt
slinger $alt
snipper $alt
sodemieter $alt
splinter $alt
sputter $alt
suiker $alt
timmer $alt
tover $alt
vinger $alt
volker $alt
vorder $alt
wakker $alt
water $alt
wegwijzer $alt
wonder $alt
zever $alt
zonder $alt
zuiver $alt
zwanger $alt

// words where -age is [a:Q@] not French ['a:Z@]
drage $alt
hedentendage $alt
gestage $alt $2
grage $alt
inzage $alt
lage $alt
oplage $alt
sage $alt
lrage $alt
vrage $alt

// -age exceptions
amperage Amp@r'a:Z@
camouflage ka:mufl'a:Z@
courtage kurt'a:Z@
curettage kyr@t'a:Z@
drainage drEn'a:Z@
equipage e:kwip'a:Z@
jumelage Zym@l'a:Z@
metrage me:tr'a:Z@
outillage utij'a:Z@
vrijage vre:j'a:Z@



// pronunciation exceptions
aangrijpend $2
@@ -320,7 +441,6 @@ bourgondier burx'o:ndi:@r
circuit sIrku'i
computer $2
contour ko:nt'ur
eren I:*@n
ingewikkeld $3
ingrijpend $2
ingeval $3
@@ -328,7 +448,6 @@ ingevolge $3
ingrediënt $4
ingenieur Inzj@nj'Y:r
journaal Surn'a:l
natuur na:t'yr
ongastvrij OnQAstv@-*'EI
ongelooflijk $3
ongemakkelijk $3

+ 78
- 29
dictsource/nl_rules View File

@@ -2,8 +2,8 @@

.group a
a a:
a (CC A
a (C_ A
a (CK A
a (x A
aa a:
aai a:j
ae E:
@@ -12,6 +12,11 @@

_) aan (@P3 'a:n
aa (rd_ 'a:
aa (t_ 'a:
_) af (C@P2 'Af
age (_ 'a:Z@
ages (_S1 s
age (_$w_alt a:Q@
aire (_ 'E:r


@@ -20,12 +25,16 @@
bb b
bs (_N ps

&) baar (_ =ba:r
_) be (@P2 b@
_) b (ee+ b
_) be (ren bI:
_) be (ter be:
_) be (ven_ be:
_) bever be:v@r
_) be (zem be:
_) beu bY:
&) baar (_ =ba:r
_) bij (C@P3 b'EI


.group c
@@ -34,6 +43,13 @@
c (y s
c k
ch x
_) ch S
_) ch (arit x
_) ch (arter tS
_) ch (emi x
_) ch (ip tS
_) ch (olest x
_) ch (r x
ck k


@@ -46,10 +62,10 @@

.group e
e e:
@C) e (_S1q @
&C) e (_S1q @
e (_ @
e (CC E
e (C_ E
e (CK E
e (x E
e (r I:
eï (+ @_I
ei (+ EI
@@ -57,22 +73,27 @@
ee e:
eeuw eU
eu Y:
@) ee (rd_ 'I:
@) ee (l_ 'e:
@) ee (m_ 'e:
@) ee (rt_ 'e:
@) el (_ @l
@) eld (_ @ld
@) ele (_ @l@
@) en (_S2d @n
@) ens (_S3 @ns
@) end (_ @nd
@) ende (_ @nd@
@) er (_ @r
@) ere (_ @r@
@) er (en_$p_alt @r // where 'eren' is not a verb ending
@) eren (_ 'e:r@n
@) es (_ @s
@) ee (r_ 'I:
@) ee (rt_ 'I:
@) ee (rd_ 'I:
@) ee (rde_ 'I:
@) ee (rden_ 'I:
it) eit (_ 'EIt
&) el (_ @l
&) eld (_ @ld
&) ele (_ @l@
&) em (_ @m
&) en (_S2q @n
&) ens (_S3q @ns
&) end (_ @nd
&) ende (_ @nd@
&) er (_ @r
&) ere (_ @r@
&) er (en_$p_alt @r // where 'eren' is not a verb ending
eren (_ 'I:r@n
&) es (_ @s

eau o: //words with French origin

@@ -80,6 +101,7 @@
@) e (raar_ @

&) e (nB@ @
id) e (nt E
&) e (rC@ @


@@ -110,8 +132,8 @@
.group i
i i
ij (+ EI
i (CC I
i (C_ I
i (CK I
i (x I
ie i
ieuw iw

@@ -120,10 +142,13 @@
m) ie (_ 'i
p) ie (_ 'i

ie (f_ 'i
ie (r_ 'i
ie (rd_ 'i
@) ig (_ @x
@) ig (_S2d @x
@) ige (_ @Q@
_) in (gP2 'In
io (nage iO
@) isch (_ =is
@) ische (_ =is@

@@ -136,11 +161,15 @@
k k
kk k

_) koning k'o:nIN // in compounds
_) koningin ko:nIQ'In


.group l
l l
ll l
@) lijk (_S4 l@k
&) lijk (_S4 l@k
&) lijke (_S5 l@k@
&) laan (_S4 la:n
@) loog (_ lo:x

@@ -159,8 +188,8 @@

.group o
o o:
o (CC O
o (C_ O
o (CK O
o (x O
o (r o:
oo (r O: // ?? or just for word-final "oor" ?
ooi o:j
@@ -168,12 +197,14 @@
oe u
oei uj
ou VU
ou (rage u

telef) oo (n 'o:


.group on
_) onaan (@P5 On'a:n
_) onder (@P5 'Ond@r
_) onge (@P4 ,OnQ@
_) ont (@P3 Ont
_) on (te@P2 On // ontegecht
@@ -198,11 +229,15 @@
.group p
p p
pp p
_) ph f
ph (K f


.group q
q k
qu kv
@) qu (eer k
@) qu (eren_ k


.group r
@@ -211,6 +246,13 @@
C) r (A @-*
rr *r

.group re
_) re (geren r@
_) re (geer r@
_) re (cent r@
_) re (cept r@
_) re (ceptief re:
_) re (serve_ r@

.group s
s s
@@ -218,6 +260,8 @@
sch sx
sch (_ s
sch (e_ s
_) sh S
sh (K S
sj S
@@) s (_S1 s

@@ -233,6 +277,8 @@
th t
t (haar t // th is not [t]
t (hav t
_) toe (@P3 t'u


.group te
_) tegen (P5 t'e:Q@n
@@ -252,7 +298,7 @@
_) te (recht t@
_) te (sam t@ // tesamen
_) te (veel t@
_) te (vergreefP2 t@
_) te (vergeefP2 t@
_) te (voorschijn t@
_) te (vor t@ // tevoren
_) te (vred t@ // tevreden
@@ -261,8 +307,8 @@

.group u
u y
u (CC 8
u (C_ 8
u (CK 8
u (x 8
uu y
ui Wy
uw yU
@@ -279,6 +325,8 @@

.group w
w v#
w (X w
w (CK w


.group x
@@ -295,6 +343,7 @@


.group
é e:
éé e:
$ d'OlAr
, (D k'Oma:

+ 16
- 0
dictsource/ta_rules View File

@@ -239,6 +239,7 @@
_) கி (ளாஸ g
_வட) க (ிழ k
தென்) க (ிழ k
அப) க (ீர்த்தி k
_பால்) க (ுட k
_வளை) க (ுட k
மன்னார்) க (ுடி k
@@ -268,6 +269,7 @@
_வர்) க்க ggV#
_சொர்) க்க ggV#
நிர்) க்க (தி ggV
தீர்) க்க (ாலோசநை gg
_வி) க்க (ினம்_ gg
அ) க்க (ினி gg
ஆரோ) க்க (ிய gg
@@ -275,8 +277,10 @@
_வி) க்க (ிரக gg
கு) க்கி (ராம gg
ஜன) க்க (ும்பல gg
அ) க (்டோபர k
வி) க்ட (ோரியா kt. // victoria
வி) க (்ரம k
ஆ) க (்ரோஷ k
//endsort


@@ -535,6 +539,7 @@
_) தி (யான dj
_) த (ிரவ d
_) த (ிரவிய d
_) தி (ராவிட d
_) த (ிரௌபதி d
_) த (ில்லி d
_) த (ிவச d
@@ -814,6 +819,7 @@ _பார்வ) த (ி t
_) ப (ாரதி b
_) ப (ாரத்த b
_) ப (ாரம b
_) ப (ாரம்பரிய p
_) ப (ார்கவி b
_) ப (ார்மசி f
_) ப (ார்மஸி f
@@ -982,6 +988,7 @@ _முகத்தின்_) ப (ாவ b
வட) ப (ழ pV
வீண்) ப (ழி pV
_தீ) ப (ா p
உ) ப (ாசனை p
சமன்) ப (ாட p
முரன்) ப (ாட p
ப (ாண்டி p
@@ -1051,6 +1058,7 @@ _முகத்தின்_) ப (ாவ b
_ர) ப்ப (ர bbV
துர்) ப்ப (ாக்கிய bb
ஆர்) ப்ப (ாட்ட bb
_நில) ப்பி (ரபு pp
மன) ப்பி (ரமை bb
துர்) ப்ப (ோதனை bb
கம்) ப்யூட (ர pjU:t.V
@@ -1060,6 +1068,7 @@ _முகத்தின்_) ப (ாவ b
// and not preceded by ம், then ப should sound as 'pa'.
ப (ட pV
@) ப (Bட p
@) ப்ட pt.V# // செப்டம்பர+
ம்) ப (ட bV
ம்) ப (Bட b

@@ -1121,6 +1130,7 @@ _முகத்தின்_) ப (ாவ b
_) பி (ரஸ்தா p
_) பி (ரஹலாத p
_) பி (ராகார p
_) பி (ராக்கள b
_) பி (ராண_ p
_) பி (ராணன p
_) பி (ராணி p
@@ -1142,6 +1152,11 @@ _முகத்தின்_) ப (ாவ b
_) பி (ரார்தன p
_) பி (ரார்தி p
_) பி (ரார்த்த p
_) பி (ராவின b
_) பி (ராவிற் b
_) பி (ராவில b
_) பி (ராவுக்கு b
_) பி (ராவை b
_) பி (ரிட b
_) பி (ரித்தானி b
_) பி (ரியன p
@@ -1159,6 +1174,7 @@ _முகத்தின்_) ப (ாவ b
_) பி (ரோகிதர p
_) பி (ளாட்பார p
_) பி (ளாஸ்க் f // flask
_) பிள (ைட் fl.
_) பீ (ராமண b
அதிக) ப்பி (ரசங்க pp
_பர) ப்பி (ரம்ம pb

+ 42
- 47
phsource/compile_report View File

@@ -17,8 +17,8 @@ consonants 9 115
jbo 2 114
nci 3 123
fi 40 133
fr 56 138
fr-ca 11 138
fr 55 137
fr-ca 11 137
hi 58 149
ta 20 151
hu 24 121
@@ -32,7 +32,7 @@ consonants 9 115
sr 14 138
it 18 126
la 21 124
es 8 123
es 10 123
es-la 1 123
ca 11 125
pt 29 138
@@ -59,11 +59,11 @@ consonants 9 115
ne 18 156
pa 14 150
prs 8 111
sl 6 133
sl 7 133
gd 6 107
bg 10 119
nso 8 107
ht 11 138
ht 11 137

Data file Used by
b/b [b] base
@@ -341,8 +341,8 @@ l/l_ [l/] base
[l/] fr
l/l_@ [l/3] base
[l/] fr
l/l@ [á3m] base
[l#] base
l/l@ [l#] base
[€¦] base
[l] fr
[l/2] fr
l/L1_aL [l/] base
@@ -367,14 +367,14 @@ l/L2_oL [l/2] base
l/L2_uL [l/2] base
l/l_3 [l/] de
l/l_4 [ll] sq
l/la [á3m] base
[l#] base
l/la [l#] base
[€¦] base
[l] fr
[l/2] fr
l/l_a [l/3] base
[l/] fr
l/le [á3m] base
[l#] base
l/le [l#] base
[€¦] base
[l] fr
[l/2] fr
l/l_e [l/3] base
@@ -383,8 +383,8 @@ l/L_eL_af [&] af
[&:] af
l/l_front [L] sq
l/l_front_ [l/4] sq
l/li [á3m] base
[l#] base
l/li [l#] base
[€¦] base
[l] fr
[l/2] fr
[l] zh
@@ -395,15 +395,15 @@ ll/ll [L] bg
ll/_ll [L] bg
l/l_long [l] base
[l] fr
l/lo [á3m] base
[l#] base
l/lo [l#] base
[€¦] base
[l] fr
[l/2] fr
l/l_o [l/3] base
[l/] fr
l^/l_rfx [l.] base
l/lu [á3m] base
[l#] base
l/lu [l#] base
[€¦] base
[l] fr
[l/2] fr
l/l_u [l/3] base
@@ -1640,7 +1640,6 @@ vowel/o [o] base2
[oU] en-wi
[o:] de
[o] fr
[o2] fr
[o] hi
[o] ta
[o:] ta
@@ -1676,7 +1675,6 @@ vowel/o_5 [O] nl
vowel/o_6 [O:] nl
vowel/o_7 [o] ku
vowel/o_8 [o] fr
[o2] fr
[o] ht
vowel/oe [W] af
[W] de
@@ -1690,7 +1688,6 @@ vowel/o_mid [U@] en-rp
[o] ne
[o] bg
vowel/o_mid2 [O] fr
[o] fr
[O] ht
vowel/oo [o] base
[O:] en-sc
@@ -1825,8 +1822,6 @@ vowel/u_bck [u] base2
[u] bg
vowel/u_bck2 [u] fr
[u:] fr
[u] ta
[u:] ta
[u:] la
[u] ht
vowel/uu [U] en
@@ -1952,51 +1947,51 @@ vwl_en_us/oor [O:] en-us
vwl_en_us/or [o@] en-us
[O:] en-sc
vwl_en_us/ur [U@] en-us
vwl_fr/@2r [�æ] fr
vwl_fr/a2r [�æ] fr
vwl_fr/aa2r [�æ] fr
vwl_fr/@2r [] fr
vwl_fr/a2r [] fr
vwl_fr/aa2r [] fr
vwl_fr/br [r/2] fr
vwl_fr/e2r [�æ] fr
vwl_fr/e_2r [�æ] fr
vwl_fr/ee2r [�æ] fr
vwl_fr/i2r [�æ] fr
vwl_fr/e2r [] fr
vwl_fr/e_2r [] fr
vwl_fr/ee2r [] fr
vwl_fr/i2r [] fr
vwl_fr/j [j/] fr
vwl_fr/o2r [�æ] fr
vwl_fr/oo2r [�æ] fr
vwl_fr/o2r [] fr
vwl_fr/oo2r [] fr
vwl_fr/r [r] fr
[r/2] fr
vwl_fr/r_ [r/] fr
vwl_fr/r_@ [r/] fr
vwl_fr/r@ [�æ] fr
vwl_fr/r@ [] fr
vwl_fr/@R [x] pt-pt
vwl_fr/r@2 [�æ] fr
vwl_fr/r@2 [] fr
vwl_fr/@R2 [R] fr-ca
vwl_fr/ra [�æ] fr
vwl_fr/ra [] fr
vwl_fr/r_a [r/] fr
vwl_fr/raa [�æ] fr
vwl_fr/re [�æ] fr
vwl_fr/raa [] fr
vwl_fr/re [] fr
vwl_fr/r_e [r/] fr
vwl_fr/re2 [�æ] fr
vwl_fr/ree [�æ] fr
vwl_fr/ri [�æ] fr
vwl_fr/re2 [] fr
vwl_fr/ree [] fr
vwl_fr/ri [] fr
vwl_fr/r_i [r/] fr
vwl_fr/rj [�æ] fr
vwl_fr/rj [] fr
vwl_fr/r_n [r/] fr
vwl_fr/ro [�æ] fr
vwl_fr/ro [] fr
vwl_fr/r_o [r/] fr
vwl_fr/roo [�æ] fr
vwl_fr/roo [] fr
vwl_fr/rr [r/] fr
vwl_fr/ru [�æ] fr
vwl_fr/ru [] fr
vwl_fr/r_u [r/] fr
vwl_fr/rw [�æ] fr
vwl_fr/ry [�æ] fr
vwl_fr/rw [] fr
vwl_fr/ry [] fr
vwl_fr/r_y [r/] fr
vwl_fr/tr [r/2] fr
vwl_fr/trr [r/] fr
vwl_fr/u2r [�æ] fr
vwl_fr/u2r [] fr
vwl_fr/wa [w] fr
[w/] fr
vwl_fr/y2r [�æ] fr
vwl_fr/y2r [] fr
vwl_hi/l-voc [l-] base
[l-] sk
[l:] sk

+ 4
- 2
phsource/ph_afrikaans View File

@@ -16,7 +16,8 @@ phoneme @ // Schwa, but always unstressed
unstressed
length 140
IF nextPh(r/) THEN
FMT(vwl_af/r@, 50)
Length 190
FMT(vwl_af/r@)
ENDIF
FMT(vwl_af/@)
endphoneme
@@ -39,7 +40,8 @@ phoneme I // short I, Schwa
vowel starttype #@ endtype #@
length 140
IF nextPh(r/) THEN
FMT(vwl_af/r@, 50)
Length 190
FMT(vwl_af/r@)
ENDIF
FMT(vwl_af/I)
endphoneme

+ 1
- 0
phsource/ph_albanian View File

@@ -282,6 +282,7 @@ endphoneme
phoneme dZ;
vcd pla afr sibilant palatal
voicingswitch tS;
ipa dʑ
lengthmod 5
Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70


+ 2
- 0
phsource/ph_croatian View File

@@ -25,6 +25,7 @@ endphoneme

phoneme tS; // this is letter ć
vls pal afr sibilant palatal
ipa tɕ
lengthmod 2
voicingswitch dZ;
Vowelin f1=0 f2=2500 300 500 f3=300 80 rate len=70
@@ -69,6 +70,7 @@ endphoneme
phoneme dZ; // letter đ
vcd pla afr sibilant palatal
lengthmod 5
ipa dʑ
voicingswitch tS;
Vowelin f1=2 f2=2500 300 500 f3=300 80 rate len=70


+ 1
- 4
phsource/ph_english View File

@@ -113,11 +113,8 @@ endphoneme


phoneme 3 // Schwa, used for rhotic schwa in American
vowel starttype #@ endtype #@
unstressed
length 140
ipa ə
CALL @
ipa ə
endphoneme



+ 1
- 4
phsource/ph_english_rp View File

@@ -17,11 +17,8 @@ endphoneme


phoneme 3 // Schwa, used for rhotic schwa in American
vowel starttype #@ endtype #@
unstressed
length 140
ipa ə
CALL @
ipa ə
endphoneme



+ 5
- 2
phsource/ph_english_sc View File

@@ -70,6 +70,7 @@ endphoneme

phoneme a#
vowel starttype #@ endtype #@
ipa ɐ
unstressed
length 140
IfNextVowelAppend(r-)
@@ -152,7 +153,8 @@ phoneme A:
ipa a:
IfNextVowelAppend(r-)
IF nextPh(r) THEN
FMT(vowelr/aa_r, 30)
Length 250
FMT(vowelr/aa_r)
ENDIF
FMT(vowel/a_3)
endphoneme
@@ -235,7 +237,8 @@ phoneme u:
Length 200
ENDIF
IF nextPh(isPause) THEN
FMT(vowel/u#_4, 40)
Length 200
FMT(vowel/u#_4)
ENDIF
FMT(vowel/u#)
endphoneme

+ 11
- 68
phsource/ph_french View File

@@ -1,7 +1,7 @@
//====================================================
// French
//====================================================
// Updated 2010-06-22 Michel Such <[email protected]>
// Updated 2010-07-16 Michel Such <[email protected]>

phoneme #l virtual
// Used for l and l/
@@ -115,7 +115,6 @@ phoneme r/ // variant of [r] when not preceding a vowel
vcd uvl frc
rhotic
starttype #r endtype #r
Vowelout f1=1 f2=1200 -400 800 f3=200 100 len=30
lengthmod 7
ipa U+0281

@@ -282,13 +281,12 @@ phoneme a
length 170
ENDIF

FMT(vowel/a_7)
FMT(vowel/a_7, 85)
endphoneme


phoneme e
vowel starttype #e endtype #e
palatal

IF nextPh(l/) THEN
VowelEnding(l/xl, -20)
@@ -364,7 +362,7 @@ endphoneme
phoneme j/ // Short "i" between "r" and a vowel
vowel starttype #i endtype #i
length 100
unstressed
// unstressed

NextVowelStarts
VowelStart(j/j@)
@@ -386,47 +384,6 @@ phoneme o
length 170
ENDIF

IF thisPh(isFinalVowel) THEN
IF thisPh(isWordEnd) THEN
FMT(vowel/o_8)
ELIF nextPh(p2) OR nextPh(t2) OR nextPh(z2) THEN
FMT(vowel/o_8)
ELIF nextPh(z) THEN
FMT(vowel/o)
ELSE
FMT(vowel/o_mid2)
ENDIF
ELSE
IF nextPhW(#r) AND next2Ph(isNotVowel) THEN
ChangePhoneme(O)
ELIF nextPhW(isLiquid) AND next2Ph(isNotVowel) THEN
ChangePhoneme(O)
ELIF nextPhW(n) AND next2Ph(j) THEN
FMT(vowel/o)
ELIF nextPhW(isNasal) AND next2Ph(isLiquid) THEN
ChangePhoneme(O)
ELIF nextPhW(isNotVowel) AND next2Ph(isNasal) THEN
ChangePhoneme(O)
ELIF nextPhW(d) AND next2Ph(isNotVowel) THEN
ChangePhoneme(O)
ELIF nextPhW(t) AND next2Ph(isLiquid) AND nextVowel(isFinalVowel) THEN
ChangePhoneme(O)
ELSE
FMT(vowel/o)
ENDIF
FMT(vowel/o)
ENDIF
endphoneme


phoneme o2
vowel starttype #o endtype #o
IF nextPh(isVowel) THEN
length 220
ELSE
length 170
ENDIF

IF thisPh(isFinalVowel) THEN
FMT(vowel/o_8)
ELSE
@@ -437,10 +394,10 @@ endphoneme

phoneme O
vowel starttype #o endtype #o
IF nextPhW(#r) THEN
length 200
ELSE
length 170
length 170
IF nextPhW(z) OR nextPhW(z2) OR nextPhW(z3) THEN
ChangePhoneme(o)
ENDIF

FMT(vowel/o_mid2)
@@ -498,23 +455,7 @@ phoneme Y
vowel starttype #@ endtype #@
length 170

IF thisPh(isFinalVowel) THEN
IF thisPh(isWordEnd) THEN
FMT(vowel/y#)
ELIF nextPh(z2) OR nextPh(t2) THEN
FMT(vowel/y#)
ELSE
ChangePhoneme(W)
ENDIF
ELSE
IF nextPhW(isNotVowel) AND next2Ph(isLiquid) THEN
FMT(vowel/y#)
ELIF nextPhW(isNotVowel) AND next2Ph(isNotVowel) THEN
ChangePhoneme(W)
ELSE
FMT(vowel/y#)
ENDIF
ENDIF
FMT(vowel/y#)
endphoneme


@@ -934,7 +875,8 @@ endphoneme
phoneme z2 // silent unless followed by vowel
vcd alv frc sibilant
IF nextPh(isVowel) OR nextPh(w/) OR nextPh(j) THEN
FMT(voc/z, -20) addWav(ufric/s, 40)
Length 70
FMT(voc/z) addWav(ufric/s, 40)
ELSE
ChangePhoneme(NULL)
ENDIF
@@ -953,3 +895,4 @@ phoneme z3 // "six" and "dix". [s] before pause, [z] before vowel, else []
endphoneme




+ 2
- 1
phsource/ph_hindi View File

@@ -414,7 +414,8 @@ endphoneme


phoneme ch
import_phoneme base/tS;
CALL base/tS;
ipa ch
endphoneme



+ 1
- 0
phsource/ph_macedonian View File

@@ -12,6 +12,7 @@ endphoneme
phoneme dZ;
vcd pal afr sibilant palatal
lengthmod 5
ipa dʑ
voicingswitch tS;
Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70


+ 1
- 4
phsource/ph_portugal View File

@@ -153,11 +153,8 @@ endphoneme


phoneme s# // This is [s] for Brazil, [S] for Portugal
vls pla frc sibilant
lengthmod 3
ipa ʃ
CALL base/S
// import_phoneme base/S
ipa ʃ
endphoneme



+ 1
- 3
phsource/ph_pt_brazil View File

@@ -200,10 +200,8 @@ endphoneme


phoneme s# // This is [s] for Brazi;, [S] for Portugal
vls alv frc sibilant
lengthmod 3
ipa s
CALL base/s
ipa s
endphoneme



+ 2
- 1
phsource/ph_romanian View File

@@ -15,7 +15,8 @@ phoneme I^ // "silent i", palatilizes the preceding consonant
ChangePhoneme(;)
ENDIF
IF prevPh(l;) THEN
FMT(vwl_ro/li, -10)
Length 60
FMT(vwl_ro/li)
ENDIF
IF prevPh(m;) THEN
FMT(vwl_ro/mi)

+ 2
- 0
phsource/ph_serbian View File

@@ -108,6 +108,7 @@ endphoneme
phoneme dZ;
vcd pla afr sibilant palatal
lengthmod 5
ipa dʑ
voicingswitch tS;
Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70

@@ -131,6 +132,7 @@ endphoneme
phoneme tS;
vls pal afr sibilant palatal
lengthmod 2
ipa tɕ
voicingswitch dZ;
Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70
WAV(ustop/ts_sr)

+ 34
- 1
phsource/ph_spanish View File

@@ -31,6 +31,13 @@ phoneme g
Vowelin f1=2 f2=2300 200 300 f3=-300 80
Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk

IF thisPh(isWordStart) AND nextPh(isVowel) THEN
IF prevPh(isPause) OR prevPh(isNasal) THEN
ELSE
ChangePhoneme(Q)
ENDIF
ENDIF

IF PreVoicing THEN
FMT(g/xg)
ENDIF
@@ -41,6 +48,32 @@ phoneme g
FMT(g/g) addWav(x/g2) // weaker [g]
endphoneme

phoneme d
vcd dnt stop

IF thisPh(isWordStart) AND nextPh(isVowel) THEN
IF prevPh(isPause) OR prevPh(isNasal) OR prevPh(l) THEN
ELSE
ChangePhoneme(D)
ENDIF
ENDIF

CALL base2/d
endphoneme

phoneme b
vcd blb stop

IF thisPh(isWordStart) AND nextPh(isVowel) THEN
IF prevPh(isPause) OR prevPh(isNasal) THEN
ELSE
ChangePhoneme(B)
ENDIF
ENDIF

CALL base/b
endphoneme


phoneme D
vcd dnt frc
@@ -71,7 +104,7 @@ endphoneme

phoneme v# // a shorter [v], a little towards [b]
vcd lbd frc
ipa v
ipa ʋ
lengthmod 6
voicingswitch f
Vowelin f1=1 f2=1000 -300 -200 f3=-300 100

+ 1
- 8
phsource/ph_tamil View File

@@ -81,18 +81,13 @@ endphoneme
phoneme u
vowel starttype #u endtype #u
length 110
IF prevPhW(isVel) THEN
FMT(vowel/u_bck2)
ELSE
ChangeIfNotStressed(U)
ENDIF
ChangeIfNotStressed(U)
FMT(vowel/u_6)
endphoneme

phoneme U
vowel starttype #u endtype #u
length 110
ipa ʉ
FMT(vowel/u#_3)
endphoneme

@@ -100,7 +95,6 @@ phoneme u:
vowel starttype #u endtype #u
length 260
IF prevPhW(isVel) THEN
FMT(vowel/u_bck2)
ELSE
ChangeIfNotStressed(U:)
ENDIF
@@ -109,7 +103,6 @@ endphoneme

phoneme U:
vowel starttype #u endtype #u
ipa ʉː
length 240
FMT(vowel/u#_3)
endphoneme

+ 3
- 0
phsource/ph_zh View File

@@ -199,6 +199,7 @@ endphoneme

phoneme tS;
vls pal afr sibilant palatal
ipa tɕ
lengthmod 2
Vowelin f1=0 f2=2700 400 600 f3=300 80
WAV(ustop/tsh_pzd_unasp)
@@ -206,6 +207,7 @@ endphoneme

phoneme tS;h
vls pal afr sibilant palatal
ipa tɕh
lengthmod 2
Vowelin f1=0 f2=2700 400 600 f3=300 80
WAV(ustop/tsh_pzd, 80)
@@ -214,6 +216,7 @@ endphoneme
phoneme S;
vls pla frc sibilant
lengthmod 2
ipa ɕ
Vowelin f1=0 f2=2700 400 600 f3=300 80
WAV(ufric/sh_pzd2, 20)
endphoneme

+ 5
- 1
phsource/phonemes View File

@@ -858,7 +858,7 @@ endphoneme
//*******************************************************************


phoneme b
phoneme b
vcd blb stop
voicingswitch p
Vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk
@@ -961,6 +961,7 @@ endphoneme
phoneme dZ;
vcd pla afr sibilant palatal
voicingswitch tS;
ipa dʑ
lengthmod 5
Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70
Vowelout f1=2 f2=2700 400 600 f3=300 80
@@ -1188,6 +1189,7 @@ endphoneme
phoneme Z;
vcd pal frc sibilant palatal
voicingswitch S;
ipa ʑ
lengthmod 6
Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70
Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk
@@ -1334,6 +1336,7 @@ endphoneme
phoneme tS;
vls pal afr sibilant palatal
voicingswitch dZ;
ipa tɕ
lengthmod 2
Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70

@@ -1494,6 +1497,7 @@ endphoneme
phoneme S;
vls pal frc sibilant palatal
voicingswitch Z;
ipa ɕ
lengthmod 3
Vowelin f1=1 f2=2700 400 600 f3=200 70 rate len=70
Vowelout f1=1 f2=2700 400 600 f3=200 70 rate

BIN
phsource/vwl_fr/a2r View File


BIN
phsource/vwl_fr/aa2r View File


BIN
phsource/vwl_fr/e2r View File


BIN
phsource/vwl_fr/e_2r View File


BIN
phsource/vwl_fr/ee2r View File


BIN
phsource/vwl_fr/i2r View File


BIN
phsource/vwl_fr/o2r View File


BIN
phsource/vwl_fr/oo2r View File


BIN
phsource/vwl_fr/r@ View File


BIN
phsource/vwl_fr/r@2 View File


BIN
phsource/vwl_fr/r_ View File


BIN
phsource/vwl_fr/r_@ View File


BIN
phsource/vwl_fr/r_a View File


BIN
phsource/vwl_fr/r_e View File


BIN
phsource/vwl_fr/r_i View File


BIN
phsource/vwl_fr/r_n View File


BIN
phsource/vwl_fr/r_o View File


BIN
phsource/vwl_fr/r_u View File


BIN
phsource/vwl_fr/r_y View File


BIN
phsource/vwl_fr/ra View File


BIN
phsource/vwl_fr/raa View File


BIN
phsource/vwl_fr/re View File


BIN
phsource/vwl_fr/re2 View File


BIN
phsource/vwl_fr/ree View File


BIN
phsource/vwl_fr/ri View File


BIN
phsource/vwl_fr/rj View File


BIN
phsource/vwl_fr/ro View File


BIN
phsource/vwl_fr/roo View File


BIN
phsource/vwl_fr/ru View File


BIN
phsource/vwl_fr/rw View File


BIN
phsource/vwl_fr/ry View File


BIN
phsource/vwl_fr/u2r View File


BIN
phsource/vwl_fr/y2r View File


+ 69
- 7
src/compiledata.cpp View File

@@ -21,6 +21,7 @@
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <time.h>

#include "wx/wx.h"
#include "wx/wfstream.h"
@@ -359,6 +360,8 @@ static PHONEME_TAB *phoneme_out;
static int n_phcodes_list[N_PHONEME_TABS];
static PHONEME_TAB_LIST phoneme_tab_list2[N_PHONEME_TABS];
static PHONEME_TAB *phoneme_tab2;
static int phoneme_flags;
static int place_articulation;

#define N_PROCS 50
int n_procs;
@@ -838,16 +841,41 @@ static int ph_sorter(char **a, char **b)



static void PrintPhonemesUsed(FILE *f, const char *dictname)
{//=========================================================
static void PrintPhonemesUsed(FILE *f, const char *dsource, const char *dictname)
{//==============================================================================
int ix;
PHONEME_TAB *ph;
PHONEME_TAB *ph_tab[N_PHONEME_TAB];
int count = 0;
int n_ph = 0;
int section = 0;
time_t mod_time;
char fname[sizeof(path_home)+45];
struct stat statbuf;
char time_string[20];
const char *files[] = {"rules","list","listx"};

fprintf(f,"\n\nDictionary %s_dict\n",dictname);
// find the date-stamp of the dictionary source files
mod_time = 0;
for(ix=0; ix<3; ix++)
{
sprintf(fname,"%s%s_%s",dsource, dictname, files[ix]);
if(stat(fname,&statbuf) == 0)
{
if(statbuf.st_mtime > mod_time)
mod_time = statbuf.st_mtime;
}
}

if(mod_time > 0)
{
strftime(time_string, sizeof(time_string), "%F", localtime(&mod_time));
fprintf(f,"\n\nDictionary %s_dict %s\n",dictname, time_string);
}
else
{
fprintf(f,"\n\nDictionary %s_dict\n",dictname);
}
fflush(f);

for(ix=0; (ix<N_PHONEME_TAB) && (phoneme_tab[ix] != NULL); ix++)
@@ -1003,7 +1031,7 @@ static wxString CompileAllDictionaries()
{
memset(phoneme_tab_flags,0,sizeof(phoneme_tab_flags));
FindPhonemesUsed();
PrintPhonemesUsed(f_phused,dictname);
PrintPhonemesUsed(f_phused, path_dsource, dictname);
}

cont = dir.GetNext(&filename);
@@ -2160,7 +2188,29 @@ int CompileSound(int keyword, int isvowel)
strcpy(path, item_string);
if(item_terminator == ',')
{
value = NextItemBrackets(tSIGNEDNUMBER,1);
if((keyword == kVOWELSTART) || (keyword == kVOWELENDING))
{
value = NextItemBrackets(tSIGNEDNUMBER,1);
if(value > 127)
{
value = 127;
error("Parameter > 127",NULL);
}
if(value < -128)
{
value = -128;
error("Parameter < -128",NULL);
}
}
else
{
value = NextItemBrackets(tNUMBER,1);
if(value > 255)
{
value = 255;
error("Parameter > 255",NULL);
}
}
}
addr = LoadDataFile(path, isvowel);
addr = addr / 4; // addr is words not bytes
@@ -2525,6 +2575,18 @@ static void CallPhoneme(void)
if((ph = FindPhoneme(item_string)) == NULL)
return;
addr = ph->program;

if(phoneme_out->type == phINVALID)
{
// Phoneme type has not been set. Copy it from the called phoneme
phoneme_out->type = ph->type;
phoneme_flags = ph->phflags & ~phARTICULATION;
place_articulation = (ph->phflags & phARTICULATION) >> 16;
phoneme_out->start_type = ph->start_type;
phoneme_out->end_type = ph->end_type;
phoneme_out->std_length = ph->std_length;
phoneme_out->length_mod = ph->length_mod;
}
}

*prog_out++ = i_CALLPH + (addr >> 16);
@@ -2551,8 +2613,6 @@ static void InstnPlusPhoneme(int instn)
int CompilePhoneme(int compile_phoneme)
{//====================================
int endphoneme = 0;
int phoneme_flags = 0;
int place_articulation = 0;
int keyword;
int value;
int phcode = 0;
@@ -2568,6 +2628,8 @@ int CompilePhoneme(int compile_phoneme)
if_level = 0;
if_stack[0].returned = 0;
after_if = 0;
phoneme_flags = 0;
place_articulation = 0;

NextItem(tSTRING);
if(compile_phoneme)

+ 3
- 0
src/compiledict.cpp View File

@@ -1118,6 +1118,9 @@ static void copy_rule_string(char *string, int &state)
case 'b':
sxflags |= SUFX_B;
break;
case 'a':
sxflags |= SUFX_A;
break;
default:
if(isdigit(c))
value = (value*10) + (c - '0');

+ 36
- 29
src/dictionary.cpp View File

@@ -245,6 +245,7 @@ int LoadDictionary(Translator *tr, const char *name, int no_error)
char fname[sizeof(path_home)+20];

strcpy(dictionary_name,name); // currently loaded dictionary name
strcpy(tr->dictionary_name, name);

// Load a pronunciation data file into memory
// bytes 0-3: offset to rules data
@@ -634,32 +635,32 @@ void GetTranslatedPhonemeString(char *phon_out, int n_phon_out)
}
}
}
WritePhMnemonic(phon_out, &phon_out_ix, plist->ph, plist);

if(plist->synthflags & SFLAG_LENGTHEN)
{
WritePhMnemonic(phon_out, &phon_out_ix, phoneme_tab[phonLENGTHEN], NULL);
}
if((plist->synthflags & SFLAG_SYLLABLE) && (plist->type != phVOWEL))
{
// syllablic consonant
WritePhMnemonic(phon_out, &phon_out_ix, phoneme_tab[phonSYLLABIC], NULL);
}
if(plist->ph->code == phonSWITCH)
{
// the tone_ph field contains a phoneme table number
p = phoneme_tab_list[plist->tone_ph].name;
while((c = *p++) != 0)
{
if(option_phonemes != 3)
phon_out[phon_out_ix++] = c;
}
phon_out[phon_out_ix++] = ' ';

sprintf(&phon_out[phon_out_ix], "(%s)", p);
phon_out_ix += (strlen(p) + 2);
}
else
if(plist->tone_ph > 0)
{
WritePhMnemonic(phon_out, &phon_out_ix, phoneme_tab[plist->tone_ph], NULL);
WritePhMnemonic(phon_out, &phon_out_ix, plist->ph, plist);
if(plist->synthflags & SFLAG_LENGTHEN)
{
WritePhMnemonic(phon_out, &phon_out_ix, phoneme_tab[phonLENGTHEN], NULL);
}
if((plist->synthflags & SFLAG_SYLLABLE) && (plist->type != phVOWEL))
{
// syllablic consonant
WritePhMnemonic(phon_out, &phon_out_ix, phoneme_tab[phonSYLLABIC], NULL);
}
if(plist->tone_ph > 0)
{
WritePhMnemonic(phon_out, &phon_out_ix, phoneme_tab[plist->tone_ph], NULL);
}
}
}
@@ -810,7 +811,7 @@ static int Unpronouncable_en(Translator *tr, char *word)
index += utf8_in(&c,&word[index]);
count++;

if((c==0) || (c==' '))
if((c==0) || (c==' ') || (c == '\''))
break;

if(IsVowel(tr, c) || (c == 'y'))
@@ -890,7 +891,7 @@ int Unpronouncable(Translator *tr, char *word)
if(tr->langopts.param[LOPT_UNPRONOUNCABLE] == 1)
return(0);

if((*word == ' ') || (*word == 0))
if(((c = *word) == ' ') || (c == 0) || (c == '\''))
return(0);

index = 0;
@@ -898,7 +899,7 @@ int Unpronouncable(Translator *tr, char *word)
for(;;)
{
index += utf8_in(&c,&word[index]);
if((c==0) || (c==' '))
if((c==0) || (c==' ') || (c == '\''))
break;

if(count==0)
@@ -925,7 +926,7 @@ int Unpronouncable(Translator *tr, char *word)
vowel_posn--; // disregard this as the initial letter when counting

if(vowel_posn > (tr->langopts.max_initial_consonants+1))
return(1); // no vowel, or no vowel in first four letters
return(1); // no vowel, or no vowel in first few letters

return(0);

@@ -1167,6 +1168,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
int opt_length;
int done;
int stressflags;
int dflags = 0;

signed char vowel_stress[N_WORD_PHONEMES/2];
char syllable_weight[N_WORD_PHONEMES/2];
@@ -1185,6 +1187,9 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,

stressflags = tr->langopts.stress_flags;

if(dictionary_flags != NULL)
dflags = dictionary_flags[0];

/* copy input string into internal buffer */
for(ix=0; ix<N_WORD_PHONEMES; ix++)
{
@@ -1202,16 +1207,16 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
max_output = output + (N_WORD_PHONEMES-3); /* check for overrun */

// any stress position marked in the xx_list dictionary ?
stressed_syllable = dictionary_flags[0] & 0x7;
if(dictionary_flags[0] & 0x8)
stressed_syllable = dflags & 0x7;
if(dflags & 0x8)
{
// this indicates a word without a primary stress
stressed_syllable = dictionary_flags[0] & 0x3;
stressed_syllable = dflags & 0x3;
unstressed_word = 1;
}

max_stress = GetVowelStress(tr, phonetic, vowel_stress, vowel_count, stressed_syllable, 1);
if(max_stress < 0)
if((max_stress < 0) && dictionary_flags)
{
if((tr->langopts.stress_flags & 1) && (vowel_count == 2))
{
@@ -1994,13 +1999,15 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
break;

case RULE_NOTVOWEL:
if(!IsLetter(tr, letter_w,0))
if(IsLetter(tr, letter_w, 0) || ((letter_w == ' ') && (word_flags & FLAG_SUFFIX_VOWEL)))
{
failed = 1;
}
else
{
add_points = (20-distance_right);
post_ptr += letter_xbytes;
}
else
failed = 1;
break;

case RULE_DIGIT:

+ 36
- 51
src/espeakedit.cpp View File

@@ -178,7 +178,7 @@ if(argc > 1)


// Make a menubar
myframe->SetMenuBar(MakeMenu(0));
myframe->SetMenuBar(MakeMenu(0, voice_name2));
myframe->CreateStatusBar();
myframe->SetVoiceTitle(voice_name2);

@@ -240,7 +240,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)

EVT_TIMER(1, MyFrame::OnTimer)
EVT_SIZE(MyFrame::OnSize)
EVT_SASH_DRAGGED_RANGE(ID_WINDOW_TOP, ID_WINDOW_BOTTOM, MyFrame::OnSashDrag)
EVT_SASH_DRAGGED(ID_WINDOW_LEFT, MyFrame::OnSashDrag)
END_EVENT_TABLE()


@@ -260,22 +260,16 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, c
int result;
int param;

// Create some dummy layout windows
wxSashLayoutWindow *win;

// Another window to the left of the client window
win = new wxSashLayoutWindow(this, ID_WINDOW_LEFT2,
m_leftWindow = new wxSashLayoutWindow(this, ID_WINDOW_LEFT,
wxDefaultPosition, wxSize(298, 30),
wxNO_BORDER | wxSW_3D | wxCLIP_CHILDREN);
win->SetDefaultSize(wxSize(310, 1000));
win->SetOrientation(wxLAYOUT_VERTICAL);
win->SetAlignment(wxLAYOUT_LEFT);
// win->SetBackgroundColour(wxColour(0, 255, 255));
win->SetSashVisible(wxSASH_RIGHT, TRUE);

m_leftWindow2 = win;
m_leftWindow->SetDefaultSize(wxSize(310, 1000));
m_leftWindow->SetOrientation(wxLAYOUT_VERTICAL);
m_leftWindow->SetAlignment(wxLAYOUT_LEFT);
m_leftWindow->SetSashVisible(wxSASH_RIGHT, TRUE);

notebook = new wxNotebook(m_leftWindow2,-1);
notebook = new wxNotebook(m_leftWindow,-1);
// notebook->AddPage(voicedlg,_T("Voice"),FALSE);
formantdlg = new FormantDlg(notebook);
notebook->AddPage(formantdlg,_T(" Spect"),FALSE);
@@ -336,12 +330,14 @@ void MyFrame::SetVoiceTitle(char *voice_name)
{//==========================================
char buf[100];
SetTitle(AppName + _T(" - ") + wxString(voice_name,wxConvLocal) + _T(" voice"));
if(data_menu != NULL)
if((data_menu != NULL) && (translator != NULL))
{
sprintf(buf,"Compile &dictionary '%s'",dictionary_name);
sprintf(buf,"Compile &dictionary '%s'",translator->dictionary_name);
data_menu->SetLabel(MENU_COMPILE_DICT, wxString(buf,wxConvLocal));
sprintf(buf,"&Layout '%s_rules' file",dictionary_name);
sprintf(buf,"&Layout '%s_rules' file",translator->dictionary_name);
data_menu->SetLabel(MENU_FORMAT_DICTIONARY, wxString(buf,wxConvLocal));
sprintf(buf,"&Sort '%s_rules' file",translator->dictionary_name);
data_menu->SetLabel(MENU_SORT_DICTIONARY, wxString(buf,wxConvLocal));
}
}

@@ -563,8 +559,8 @@ void DisplayErrorFile(const char *fname)
len = GetFileLength(fname);
if(len > 0)
{
if(len > 2000)
len = 2000; // restrict length to pppppevent crash in wxLogMessage()
if(len > 1500)
len = 1500; // restrict length to pppppevent crash in wxLogMessage()
msg = (char *)malloc(len+1);
if(msg != NULL)
{
@@ -633,8 +629,8 @@ void MyFrame::OnTools(wxCommandEvent& event)
sprintf(fname_log,"%s%s",path_dsource,"dict_log");
log = fopen(fname_log,"w");

LoadDictionary(translator, dictionary_name, 0);
if((err = CompileDictionary(path_dsource,dictionary_name,log,err_fname,debug_flag)) < 0)
LoadDictionary(translator, translator->dictionary_name, 0);
if((err = CompileDictionary(path_dsource,translator->dictionary_name,log,err_fname,debug_flag)) < 0)
{
wxLogError(_T("Can't access file:\n")+wxString(err_fname,wxConvLocal));

@@ -729,37 +725,26 @@ void MyFrame::OnSpeak(wxCommandEvent& event)

void MyFrame::OnSashDrag(wxSashEvent& event)
{
if (event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE)
return;

switch (event.GetId())
{
case ID_WINDOW_TOP:
{
m_topWindow->SetDefaultSize(wxSize(1000, event.GetDragRect().height));
break;
}
case ID_WINDOW_LEFT1:
{
m_leftWindow1->SetDefaultSize(wxSize(event.GetDragRect().width, 1000));
break;
}
case ID_WINDOW_LEFT2:
{
m_leftWindow2->SetDefaultSize(wxSize(event.GetDragRect().width, 1000));
break;
}
case ID_WINDOW_BOTTOM:
{
m_bottomWindow->SetDefaultSize(wxSize(1000, event.GetDragRect().height));
break;
}
}
wxLayoutAlgorithm layout;
layout.LayoutMDIFrame(this);
int w, h;

if (event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE)
return;

GetClientSize(&w, &h);

switch (event.GetId())
{
case ID_WINDOW_LEFT:
{
m_leftWindow->SetDefaultSize(wxSize(event.GetDragRect().width, h));
break;
}
}
wxLayoutAlgorithm layout;
layout.LayoutMDIFrame(this);

// Leaves bits of itself behind sometimes
GetClientWindow()->Refresh();
// Leaves bits of itself behind sometimes
GetClientWindow()->Refresh();
}



+ 1
- 1
src/klatt.cpp View File

@@ -421,7 +421,7 @@ if(option_log_frames)
#endif

out = resonator(&(kt_globals.rsn[Rout]),out);
temp = (out * wdata.amplitude * kt_globals.amp_gain0) ; /* Convert back to integer */
temp = (int)(out * wdata.amplitude * kt_globals.amp_gain0) ; /* Convert back to integer */


// mix with a recorded WAV if required for this phoneme

+ 3
- 9
src/main.h View File

@@ -8,7 +8,7 @@ typedef unsigned char UCHAR;



extern wxMenuBar *MakeMenu(int type);
extern wxMenuBar *MakeMenu(int type, const char *dict_name);

extern wxString path_phsource;
extern wxString path_speaktext;
@@ -56,10 +56,7 @@ class MyFrame: public wxMDIParentFrame


protected:
wxSashLayoutWindow* m_topWindow;
wxSashLayoutWindow* m_leftWindow1;
wxSashLayoutWindow* m_leftWindow2;
wxSashLayoutWindow* m_bottomWindow;
wxSashLayoutWindow* m_leftWindow;
wxTimer m_timer;

DECLARE_EVENT_TABLE()
@@ -177,10 +174,7 @@ enum {
SPECTSEQ_VOICEDLG
};

#define ID_WINDOW_TOP 100
#define ID_WINDOW_LEFT1 101
#define ID_WINDOW_LEFT2 102
#define ID_WINDOW_BOTTOM 103
#define ID_WINDOW_LEFT 101




+ 1
- 1
src/mbrowrap.cpp View File

@@ -19,7 +19,7 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <malloc.h>
#include <stdlib.h>
#include <signal.h>
#include <fcntl.h>
#include <poll.h>

+ 10
- 4
src/menus.cpp View File

@@ -22,13 +22,12 @@

#include "main.h"


wxMenu *speak_menu;
wxMenu *data_menu = NULL;

wxMenuBar *MakeMenu(int type)
{//==========================
wxMenuBar *MakeMenu(int type, const char *dict_name)
{//=================================================
char buf[100];
wxMenu *file_menu;
wxMenu *help_menu;
wxMenu *option_menu = NULL;
@@ -95,6 +94,13 @@ wxMenuBar *MakeMenu(int type)
data_menu->Append(MENU_FORMAT_DICTIONARY, _("&Layout *_rules file"));
data_menu->Append(MENU_SORT_DICTIONARY, _("&Sort *_rules file"));

sprintf(buf,"Compile &dictionary '%s'",dict_name);
data_menu->SetLabel(MENU_COMPILE_DICT, wxString(buf,wxConvLocal));
sprintf(buf,"&Layout '%s_rules' file",dict_name);
data_menu->SetLabel(MENU_FORMAT_DICTIONARY, wxString(buf,wxConvLocal));
sprintf(buf,"&Sort '%s_rules' file",dict_name);
data_menu->SetLabel(MENU_SORT_DICTIONARY, wxString(buf,wxConvLocal));

// OPTIONS MENU
paths_menu = new wxMenu;
paths_menu->Append(MENU_PATH0, _("Master phonemes file..."));

+ 1
- 1
src/phoneme.h View File

@@ -36,6 +36,7 @@

// phoneme properties
// bits 16-19 give place of articulation
#define phARTICULATION 0xf0000
#define phWAVE 0x01
#define phUNSTRESSED 0x02
#define phFORTIS 0x08
@@ -50,7 +51,6 @@
#define phBRKAFTER 0x4000 // [*] add a post-pause
#define phBEFOREPAUSE 0x8000 // replace with the link_out phoneme if the next phoneme is a pause


#define phNONSYLLABIC 0x100000 // don't count this vowel as a syllable when finding the stress position
#define phLONG 0x200000
#define phLENGTHENSTOP 0x400000 // make the pre-pause slightly longer

+ 6
- 2
src/prosodydisplay.cpp View File

@@ -591,6 +591,8 @@ void MyFrame::OnProsody(wxCommandEvent& WXUNUSED(event))
// Open the Prosody display window
// Make another frame, containing a canvas

int h, w, w2;

if(prosodyframe != NULL)
{
// The Prosody window is already open
@@ -598,8 +600,10 @@ void MyFrame::OnProsody(wxCommandEvent& WXUNUSED(event))
return;
}

m_leftWindow->GetSize(&w2, &h);
GetClientSize(&w, &h);
prosodyframe = new ChildFrProsody(myframe, _T(""),
wxPoint(10, 200), wxSize(1000, 300),
wxPoint(0, 100), wxSize(w-w2, 420),
wxDEFAULT_FRAME_STYLE |
wxNO_FULL_REPAINT_ON_RESIZE);

@@ -622,7 +626,7 @@ void MyFrame::OnProsody(wxCommandEvent& WXUNUSED(event))
prosodycanvas = canvas;
// Associate the menu bar with the frame
prosodyframe->SetMenuBar(MakeMenu(2));
prosodyframe->SetMenuBar(MakeMenu(2,translator->dictionary_name));
prosodyframe->prosodycanvas = canvas;
prosodyframe->Show(TRUE);


+ 7
- 5
src/spectdisplay.cpp View File

@@ -35,6 +35,7 @@
#include "phoneme.h"
#include "synthesize.h"
#include "voice.h"
#include "translate.h"
#include "spect.h"
#include "options.h"

@@ -981,6 +982,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& event)
SpectSeq *spectseq;
wxString leaf;
wxString pathload;
int width, height;

if(event.GetId() == MENU_SPECTRUM)
pathload = path_spectload;
@@ -1021,10 +1023,11 @@ void MyFrame::OnNewWindow(wxCommandEvent& event)
else
path_spectload2 = path.GetPath();

// Make another frame, containing a canvas
// Make another frame, containing a canvas
GetClientSize(&width, &height);
MyChild *subframe = new MyChild(myframe, _T("Spectrum"),
wxPoint(10, 10), wxSize(300, 300),
wxDEFAULT_FRAME_STYLE | wxMAXIMIZE |
wxPoint(10, 0), wxSize(500, height),
wxDEFAULT_FRAME_STYLE |
wxNO_FULL_REPAINT_ON_RESIZE);

subframe->SetTitle(leaf);
@@ -1032,14 +1035,13 @@ void MyFrame::OnNewWindow(wxCommandEvent& event)
// Give it a status line
subframe->CreateStatusBar();

int width, height;
subframe->GetClientSize(&width, &height);
SpectDisplay *canvas = new SpectDisplay(subframe, wxPoint(0, 0), wxSize(width, height), spectseq);
canvas->savepath = filename;
currentcanvas = canvas;

// Associate the menu bar with the frame
subframe->SetMenuBar(MakeMenu(1));
subframe->SetMenuBar(MakeMenu(1,translator->dictionary_name));
subframe->canvas = canvas;
subframe->Show(TRUE);


+ 0
- 1
src/synth_mbrola.cpp View File

@@ -522,7 +522,6 @@ int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbr
memset(&fmtp, 0, sizeof(fmtp));
InterpretPhoneme(NULL, 0, p, &phdata);
fmtp.fmt_addr = phdata.sound_addr[pd_FMT];
fmtp.fmt_length = phdata.sound_param[pd_FMT];
len = DoSpect2(p->ph, 0, &fmtp, p, -1);
// len = DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,-1);
len = (len * 1000)/samplerate;

+ 5
- 5
src/synthdata.cpp View File

@@ -35,8 +35,8 @@
#include "translate.h"
#include "wave.h"

const char *version_string = "1.43.52 04.Jul.10";
const int version_phdata = 0x014351;
const char *version_string = "1.43.57 18.Jul.10";
const int version_phdata = 0x014354;

int option_device_number = -1;
FILE *f_logespeak = NULL;
@@ -1041,15 +1041,15 @@ void InterpretPhoneme(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_
}
}
else
if(instn2 == 4)
if(instn2 ==pd_ADDWAV)
{
// addWav(), return if previous instruction was FMT() or WAV()
end_flag--;
}

if((instn2 != 1) && (instn2 != 4))
if((instn2 == pd_VWLSTART) || (instn2 == pd_VWLEND))
{
// FMT, VowelStart or VowelEnding.
// VowelStart or VowelEnding.
phdata->sound_param[instn2] = param_sc; // sign extend
}
}

+ 36
- 8
src/synthesize.cpp View File

@@ -54,6 +54,7 @@ static int last_wcmdq;
static int pitch_length;
static int amp_length;
static int modn_flags;
static int fmt_amplitude=0;

static int syllable_start;
static int syllable_end;
@@ -223,6 +224,13 @@ static void DoPause(int length, int control)
wcmdq[wcmdq_tail][1] = len;
WcmdqInc();
last_frame = NULL;

if(fmt_amplitude != 0)
{
wcmdq[wcmdq_tail][0] = WCMD_FMT_AMPLITUDE;
wcmdq[wcmdq_tail][1] = fmt_amplitude = 0;
WcmdqInc();
}
} // end of DoPause


@@ -972,7 +980,7 @@ static void StartSyllable(void)

int DoSpect2(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, PHONEME_LIST *plist, int modulation)
{//========================================================================================================
// which 0 not a vowel, 1 start of vowel, 2 body and end of vowel
// which: 0 not a vowel, 1 start of vowel, 2 body and end of vowel
// length_mod: 256 = 100%
// modulation: -1 = don't write to wcmdq

@@ -1025,6 +1033,15 @@ if(which==1)
if(frames == NULL)
return(0); // not found

if(fmt_params->fmt_amp != fmt_amplitude)
{
// an amplitude adjustment is specified for this sequence
q = wcmdq[wcmdq_tail];
q[0] = WCMD_FMT_AMPLITUDE;
q[1] = fmt_amplitude = fmt_params->fmt_amp;
WcmdqInc();
}

frame1 = frames[0].frame;
if(voice->klattv[0])
wcmd_spect = WCMD_KLATT;
@@ -1166,6 +1183,16 @@ if(which==1)
total_len += len;
}
}

if((which != 1) && (fmt_amplitude != 0))
{
q = wcmdq[wcmdq_tail];
q[0] = WCMD_FMT_AMPLITUDE;
q[1] = fmt_amplitude = 0;
WcmdqInc();
}


return(total_len);
} // end of DoSpect

@@ -1429,7 +1456,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
// a period of voicing before the release
InterpretPhoneme(NULL, 0x01, p, &phdata);
fmtp.fmt_addr = phdata.sound_addr[pd_FMT];
fmtp.fmt_length = phdata.sound_param[pd_FMT];
fmtp.fmt_amp = phdata.sound_param[pd_FMT];

DoSpect2(ph, 0, &fmtp, p, 0);
if(p->synthflags & SFLAG_LENGTHEN)
@@ -1457,7 +1484,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
}
InterpretPhoneme(NULL,0, p, &phdata);
fmtp.fmt_addr = phdata.sound_addr[pd_FMT];
fmtp.fmt_length = phdata.sound_param[pd_FMT];
fmtp.fmt_amp = phdata.sound_param[pd_FMT];
fmtp.wav_addr = phdata.sound_addr[pd_ADDWAV];
fmtp.wav_amp = phdata.sound_param[pd_ADDWAV];
DoSpect2(ph, 0, &fmtp, p, 0);
@@ -1504,7 +1531,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
memset(&fmtp, 0, sizeof(fmtp));
fmtp.std_length = phdata.pd_param[i_SET_LENGTH]*2;
fmtp.fmt_addr = phdata.sound_addr[pd_FMT];
fmtp.fmt_length = phdata.sound_param[pd_FMT];
fmtp.fmt_amp = phdata.sound_param[pd_FMT];
fmtp.wav_addr = phdata.sound_addr[pd_ADDWAV];
fmtp.wav_amp = phdata.sound_param[pd_ADDWAV];

@@ -1529,7 +1556,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
InterpretPhoneme(NULL,0, p, &phdata);
fmtp.std_length = phdata.pd_param[i_SET_LENGTH]*2;
fmtp.fmt_addr = phdata.sound_addr[pd_FMT];
fmtp.fmt_length = phdata.sound_param[pd_FMT];
fmtp.fmt_amp = phdata.sound_param[pd_FMT];

if(next->type==phVOWEL)
{
@@ -1578,7 +1605,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
InterpretPhoneme(NULL, 0, p, &phdata);
fmtp.std_length = phdata.pd_param[i_SET_LENGTH]*2;
fmtp.fmt_addr = phdata.sound_addr[pd_FMT];
fmtp.fmt_length = phdata.sound_param[pd_FMT];
fmtp.fmt_amp = phdata.sound_param[pd_FMT];
fmtp.wav_addr = phdata.sound_addr[pd_ADDWAV];
fmtp.wav_amp = phdata.sound_param[pd_ADDWAV];
DoSpect2(p->ph, 0, &fmtp, p, modulation);
@@ -1619,9 +1646,10 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
fmtp.use_vowelin = 1;
fmtp.fmt_control = 1;
fmtp.fmt_addr = phdata.sound_addr[pd_FMT];
// fmtp.fmt_length = phdata.sound_param[pd_FMT];
}

fmtp.fmt_amp = phdata.sound_param[pd_FMT];

pitch_env = envelope_data[p->env];
amp_env = NULL;
if(p->tone_ph != 0)
@@ -1670,7 +1698,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
}

fmtp.fmt_addr = phdata.sound_addr[pd_FMT];
fmtp.fmt_length = phdata.sound_param[pd_FMT];
fmtp.fmt_amp = phdata.sound_param[pd_FMT];
fmtp.transition0 = 0;
fmtp.transition1 = 0;


+ 4
- 0
src/synthesize.h View File

@@ -177,6 +177,7 @@ int mix_wavefile_offset;

int amplitude;
int amplitude_v;
int amplitude_fmt; // percentage amplitude adjustment for formant synthesis
} WGEN_DATA;


@@ -275,6 +276,7 @@ typedef struct {
int use_vowelin;
int fmt_addr;
int fmt_length;
int fmt_amp;
int fmt2_addr;
int fmt2_lenadj;
int wav_addr;
@@ -466,6 +468,8 @@ extern unsigned char pitch_adjust_tab[MAX_PITCH_VALUE+1];
#define WCMD_VOICE 11
#define WCMD_EMBEDDED 12
#define WCMD_MBROLA_DATA 13
#define WCMD_FMT_AMPLITUDE 14



#define N_WCMDQ 160

+ 2
- 4
src/tr_languages.cpp View File

@@ -60,8 +60,6 @@ static void Translator_Russian(Translator *tr);





static void SetLetterVowel(Translator *tr, int c)
{//==============================================
tr->letter_bits[c] = (tr->letter_bits[c] & 0x40) | 0x81; // keep value for group 6 (front vowels e,i,y)
@@ -618,7 +616,7 @@ Translator *SelectTranslator(const char *name)
tr->langopts.accents = 2; // Say "Capital" after the letter.
tr->langopts.vowel_pause = 0;

tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_OMIT_1_HUNDRED | NUM_NOPAUSE | NUM_ROMAN | NUM_VIGESIMAL | NUM_DFRACTION_4;
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_OMIT_1_HUNDRED | NUM_NOPAUSE | NUM_ROMAN | NUM_ROMAN_CAPITALS | NUM_ROMAN_AFTER | NUM_VIGESIMAL | NUM_DFRACTION_4;
SetLetterVowel(tr,'y');
}
break;
@@ -670,7 +668,7 @@ Translator *SelectTranslator(const char *name)
tr->langopts.spelling_stress = 1;
tr->langopts.accents = 1;

tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_HUNDRED_AND | NUM_OMIT_1_HUNDRED | NUM_DECIMAL_COMMA | NUM_THOUS_SPACE | NUM_DFRACTION_2 | NUM_ROMAN_UC;
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_HUNDRED_AND | NUM_OMIT_1_HUNDRED | NUM_DECIMAL_COMMA | NUM_THOUS_SPACE | NUM_DFRACTION_2 | NUM_ROMAN_CAPITALS;
tr->langopts.numbers2 = 0x4a; // variant numbers before thousands,milliards
tr->langopts.replace_chars = replace_cyrillic_latin;


+ 12
- 6
src/translate.cpp View File

@@ -862,7 +862,7 @@ if((wmark > 0) && (wmark < 8))
{
// either all upper or all lower case

if((tr->langopts.numbers & NUM_ROMAN) || ((tr->langopts.numbers & NUM_ROMAN_UC) && (wflags & FLAG_ALL_UPPER)))
if((tr->langopts.numbers & NUM_ROMAN) || ((tr->langopts.numbers & NUM_ROMAN_CAPITALS) && (wflags & FLAG_ALL_UPPER)))
{
if((found = TranslateRoman(tr, word1, phonemes, wtab)) != 0)
dictionary_flags[0] |= FLAG_ABBREV; // prevent emphasis if capitals
@@ -920,6 +920,9 @@ if((wmark > 0) && (wmark < 8))
// find a remainder that we can pronounce.
emphasize_allcaps = 0;

if(wordx[0] == '\'')
break;

if(posn > 0)
non_initial = 1;

@@ -934,6 +937,7 @@ if((wmark > 0) && (wmark < 8))
return(0);
}

#ifdef deleted
p = &wordx[word_length-3]; // this looks wrong. Doesn't consider multi-byte chars.
if(memcmp(p,"'s ",3) == 0)
{
@@ -943,7 +947,7 @@ if((wmark > 0) && (wmark < 8))
p[1] = ' ';
last_char = p[-1];
}
#endif
length=0;
while(wordx[length] != ' ') length++;
}
@@ -952,7 +956,7 @@ if((wmark > 0) && (wmark < 8))
// anything left ?
if(*wordx != ' ')
{
if(unpron_phonemes[0] != 0)
if((unpron_phonemes[0] != 0) && (wordx[0] != '\''))
{
// letters which have been spoken individually from affecting the pronunciation of the pronuncable part
wordx[-1] = ' ';
@@ -1163,9 +1167,11 @@ strcpy(phonemes2,phonemes);
else
{
if(end_flags & FLAG_SUFX)
TranslateRules(tr, wordx, phonemes, N_WORD_PHONEMES, NULL,wflags | FLAG_SUFFIX_REMOVED, dictionary_flags);
else
TranslateRules(tr, wordx, phonemes, N_WORD_PHONEMES, NULL,wflags,dictionary_flags);
wflags |= FLAG_SUFFIX_REMOVED;
if(end_type & SUFX_A)
wflags |= FLAG_SUFFIX_VOWEL;

TranslateRules(tr, wordx, phonemes, N_WORD_PHONEMES, NULL, wflags, dictionary_flags);

if(phonemes[0] == phonSWITCH)
{

+ 25
- 20
src/translate.h View File

@@ -109,6 +109,7 @@
#define FLAG_COMMA_AFTER 0x20000 // comma after this word
#define FLAG_MULTIPLE_SPACES 0x40000 // word is preceded by multiple spaces, newline, or tab

#define FLAG_SUFFIX_VOWEL 0x08000000 // remember an initial vowel from the suffix
#define FLAG_NO_TRACE 0x10000000 // passed to TranslateRules() to suppress dictionary lookup printout
#define FLAG_NO_PREFIX 0x20000000

@@ -122,6 +123,8 @@
#define SUFX_Q 0x4000 // don't retranslate
#define SUFX_T 0x10000 // don't affect the stress position in the stem
#define SUFX_B 0x20000 // break, this character breaks the word into stem and suffix (used with SUFX_P)
#define SUFX_A 0x40000 // remember that the suffix starts with a vowel


#define FLAG_ALLOW_TEXTMODE 0x02 // allow dictionary to translate to text rather than phonemes
#define FLAG_SUFX 0x04
@@ -380,16 +383,16 @@ typedef struct {
#define NUM_DFRACTION_3 0x6000
#define NUM_DFRACTION_4 0x8000
#define NUM_DFRACTION_5 0xa000
#define NUM_ORDINAL_DOT 0x10000
#define NUM_ROMAN 0x20000
#define NUM_ROMAN_UC 0x40000
#define NUM_NOPAUSE 0x80000
#define NUM_AND_HUNDRED 0x100000
#define NUM_ROMAN_AFTER 0x200000
#define NUM_VIGESIMAL 0x400000
#define NUM_ROMAN_ORDINAL 0x800000
#define NUM_ROMAN_CAPITALS 0x1000000
#define NUM_THOUSAND_AND 0x2000000
#define NUM_ORDINAL_DOT 0x10000
#define NUM_NOPAUSE 0x20000
#define NUM_AND_HUNDRED 0x40000
#define NUM_THOUSAND_AND 0x80000
#define NUM_VIGESIMAL 0x100000
#define NUM_ROMAN 0x1000000
#define NUM_ROMAN_CAPITALS 0x2000000
#define NUM_ROMAN_AFTER 0x4000000
#define NUM_ROMAN_ORDINAL 0x8000000

// bits0-1=which numbers routine to use.
// bit2= thousands separator must be space
@@ -404,16 +407,17 @@ typedef struct {
// bit11=say 19** as nineteen hundred
// bit12=allow space as thousands separator (in addition to langopts.thousands_sep)
// bits13-15 post-decimal-digits 0=single digits, 1=(LANG=it) 2=(LANG=pl) 3=(LANG=ro)
// bit16=dot after number indicates ordinal
// bit17=recognize roman numbers
// bit18=Roman numbers only if upper case
// bit19=don't add pause after a number
// bit20='and' before hundreds
// bit21= say "roman" after the number, not before
// bit22= vigesimal number, if tens are not found
// bit23=Roman numbers are ordinal numbers
// bit24=Roman numbers must be capital letters
// bit25='and' after thousands if there are no hundreds

// bit16= dot after number indicates ordinal
// bit17= don't add pause after a number
// bit18= 'and' before hundreds
// bit19= 'and' after thousands if there are no hundreds
// bit20= vigesimal number, if tens are not found

// bit24= recognize roman numbers
// bit25= Roman numbers only if upper case
// bit26= say "roman" after the number, not before
// bit27= Roman numbers are ordinal numbers
int numbers;

// bits 1-4 use variant form of numbers before thousands,millions,etc.
@@ -476,6 +480,7 @@ typedef struct
int translator_name;
int transpose_max;
int transpose_min;
char dictionary_name[40];

char phon_out[300];
char phonemes_repeat[20];

+ 2
- 1
src/transldlg.cpp View File

@@ -292,13 +292,14 @@ TranslDlg::TranslDlg(wxWindow *parent) : wxPanel(parent)


t_phonetic = new wxTextCtrl(this,T_PHONETIC,_T(""),wxPoint(0,262),
wxSize(298,height_ph),wxTE_MULTILINE | wxTE_READONLY,wxDefaultValidator,_T("Phoneme translation window"));
wxSize(298,height_ph),wxTE_MULTILINE | wxTE_READONLY, wxDefaultValidator,_T("Phoneme translation window"));

style_phonetic = t_phonetic->GetDefaultStyle();
font_phonetic = style_phonetic.GetFont();
font_size = font_phonetic.GetPointSize();
font_phonetic_large = font_phonetic;
style_phonetic_large = style_phonetic;
//font_phonetic_large.SetFamily(wxFONTFAMILY_SWISS);
font_phonetic_large.SetPointSize(font_size+1);
style_phonetic_large.SetFont(font_phonetic_large);


+ 12
- 3
src/wavegen.cpp View File

@@ -693,6 +693,7 @@ void WavegenInit(int rate, int wavemult_fact)
max_hval = 0;

wdata.amplitude = 32;
wdata.amplitude_fmt = 100;

for(ix=0; ix<N_EMBEDDED_VALUES; ix++)
embedded_value[ix] = embedded_default[ix];
@@ -1147,7 +1148,8 @@ int Wavegen()
maxh2 = PeaksToHarmspect(peaks, wdata.pitch<<4, hspect[0], 0);

// adjust amplitude to compensate for fewer harmonics at higher pitch
amplitude2 = (wdata.amplitude * wdata.pitch)/(100 << 11);
// amplitude2 = (wdata.amplitude * wdata.pitch)/(100 << 11);
amplitude2 = (wdata.amplitude * (wdata.pitch >> 8) * wdata.amplitude_fmt)/(10000 << 3);

// switch sign of harmonics above about 900Hz, to reduce max peak amplitude
h_switch_sign = 890 / (wdata.pitch >> 12);
@@ -1200,7 +1202,8 @@ int Wavegen()
}

// adjust amplitude to compensate for fewer harmonics at higher pitch
amplitude2 = (wdata.amplitude * wdata.pitch)/(100 << 11);
// amplitude2 = (wdata.amplitude * wdata.pitch)/(100 << 11);
amplitude2 = (wdata.amplitude * (wdata.pitch >> 8) * wdata.amplitude_fmt)/(10000 << 3);

if(glottal_flag > 0)
{
@@ -1535,7 +1538,7 @@ void SetEmbedded(int control, int value)
general_amplitude = GetAmplitude();
break;

case EMBED_F: // emphasiis
case EMBED_F: // emphasis
general_amplitude = GetAmplitude();
break;

@@ -1837,6 +1840,7 @@ int WavegenFill(int fill_zeros)
echo_complete -= length;
}
wdata.n_mix_wavefile = 0;
wdata.amplitude_fmt = 100;
KlattReset(1);
result = PlaySilence(length,resume);
break;
@@ -1907,6 +1911,11 @@ int WavegenFill(int fill_zeros)
case WCMD_MBROLA_DATA:
result = MbrolaFill(length, resume);
break;

case WCMD_FMT_AMPLITUDE:
if((wdata.amplitude_fmt = q[1]) == 0)
wdata.amplitude_fmt = 100; // percentage, but value=0 means 100%
break;
}

if(result==0)

Loading…
Cancel
Save