Skip to content

Commit

Permalink
ru: create Russian (Latvia) accent
Browse files Browse the repository at this point in the history
  • Loading branch information
valdisvi committed Jun 21, 2018
1 parent 2aa7c5a commit 031f34a
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ new languages:

* hak (Hakka Chinese) -- Chen Chien-ting
* ht (Haitian Creole) -- Valdis Vitolins
* ru-lv (Russian Latvia) -- Valdis Vitolins
* shn (Shan Tay Yai) -- ronaldaug

updated languages:
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ phsource/phonemes.stamp: \
phsource/ph_punjabi \
phsource/ph_romanian \
phsource/ph_russian \
phsource/ph_russian_lv \
phsource/ph_s_gaelic \
phsource/ph_serbian \
phsource/ph_setswana \
Expand Down
16 changes: 16 additions & 0 deletions dictsource/ru_rules
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
// H hard consonant: ъ ж ц ш
// Y iotated vowel, softsign: ь ю я ё

// Conditional rules
// ?2 Russian (Latvia)

.group а
а V
Expand All @@ -39,6 +41,7 @@

.group б
б b
?2 б (_ b
б (Y b;
б (_ p
б (бY b;
Expand All @@ -60,6 +63,7 @@

.group в
в v
?2 в (_ v-
в (_ f
в (Y v;
в (бY v;
Expand Down Expand Up @@ -121,6 +125,7 @@

.group е
е e
?2 A) е (_ ;e
A) е je
A) е (_ jI3 //second position
бакт) е (р E% // бактериальный, антибактериальный, ...
Expand All @@ -146,9 +151,12 @@
ж (хY S
ж (хкY S
жч S;
?2 жч SS

.group з
з z
?2 з (е z
?2 зч SS
з (Y z;
з (_ s
з (дY z;
Expand Down Expand Up @@ -203,10 +211,12 @@

.group л
л l
?2 л (Y l^
л (Y l;

.group м
м m
?2 м (Y m
м (Y m;
м (бY m;
м (вY m;
Expand All @@ -216,6 +226,7 @@

.group н
н n
?2 н (Y n^
н (Y n;
биз) не (с nE%
н (_ n_
Expand Down Expand Up @@ -251,6 +262,7 @@

.group с
с s
?2 сч S
с (Y s;
с (б z
с (г z
Expand Down Expand Up @@ -390,6 +402,7 @@

.group щ
щ S;
?2 щ SS
щ (бY Z;
щ (б Z;
щ (бвY Z;
Expand All @@ -405,12 +418,14 @@

.group ъ
ъ (Y j
?2 ъ (Y _|

.group ы
ы y

.group ь
ь (Y j
?2 ь (Y _|

.group э
э E2
Expand Down Expand Up @@ -438,6 +453,7 @@

.group ё
ё '8
?2 A) ё 'j8
_) ё 'j8
ж) ё 'O
ш) ё 'O
Expand Down
16 changes: 16 additions & 0 deletions espeak-ng-data/lang/zle/ru-LV
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name Russian (Latvia)
language ru-LV 2

maintainer Valdis Vitolins <valdis.vitolins@odo.lv>
status testing

phonemes ru-lv
dictrules 2
dict_min 20000
speed 95

words 0 2
tone 150 220 450 255 750 20 3500 255
stressAmp 12 10 8 8 0 0 16 17
stressLength 160 140 200 140 0 0 240 160

97 changes: 97 additions & 0 deletions phsource/ph_russian_lv
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
phoneme l
liquid

IF nextPh(isNotVowel) THEN
PrevVowelEndings
VowelEnding(l/L1_@L)
VowelEnding(l/L1_aL)
VowelEnding(l/L1_eL)
VowelEnding(l/L1_iL)
VowelEnding(l/L1_oL)
VowelEnding(l/L1_uL)
EndSwitch

FMT(l/l_)
RETURN
ENDIF

CALL vowelstart_l

IF prevPh(isVowel) THEN
VowelEnding(l/xl, 10)
ENDIF

IF prevPh(isPause) THEN
FMT(l/_l)
ENDIF

IF prevPh(t) THEN
FMT(l/tl)
ENDIF

IF prevPh(l/) THEN
FMT(l/l_long) // double l, make it longer
ENDIF

FMT(l/l)
endphoneme

phoneme l^ // Latvian ļ, customized from standard l^
liquid
ipa ʎ
lengthmod 7
Vowelout len=60 lenadd rate
length 100

NextVowelStarts
VowelStart(l^/j2@)
VowelStart(l^/j2a)
VowelStart(l^/j2e)
VowelStart(l^/j2i)
VowelStart(l^/j2o)
VowelStart(l^/j2u)
EndSwitch

IF prevPh(isPause) THEN
FMT(l^/_l^)
ELSEIF nextPh(isPause) THEN
FMT(l^/l^_)
ENDIF

FMT(l^/l^)
endphoneme

phoneme o
vwl starttype #o endtype #o
length 100
IF thisPh(isUnstressed) THEN
FMT(vowel/aa_7)
ENDIF
FMT(vwl_ru/o)
endphoneme

phoneme 8
vwl starttype #o endtype #o
length 120
ChangeIfNotStressed(V)
FMT(vwl_ru/8)
endphoneme

phoneme e
vwl starttype #e endtype #e
length 100
IF prevPh(Z) THEN
ChangeIfNotStressed(y)
ChangePhoneme(E)
ENDIF
IF prevPh(S) THEN
ChangeIfNotStressed(y)
ChangePhoneme(E)
ENDIF
IF prevPh(ts) THEN
ChangeIfNotStressed(y)
ChangePhoneme(E)
ENDIF
FMT(vwl_ru/ee)
endphoneme

3 changes: 3 additions & 0 deletions phsource/phonemes
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,9 @@ include ph_serbian
phonemetable ru base1
include ph_russian

phonemetable ru-lv ru
include ph_russian_lv

phonemetable bg pl
include ph_bulgarian

Expand Down

0 comments on commit 031f34a

Please sign in to comment.