mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Merge branch 'development'
Conflicts: src/wave.cpp
This commit is contained in:
+7
-1
@@ -6,7 +6,7 @@
|
||||
.L03 f h j s y z r // allow [B] [D] [Q] before these consonants
|
||||
.L04 b v f p // labials, nasals are [m]
|
||||
.L05 g k // velars, nasals are [N]
|
||||
|
||||
.L06 a e o
|
||||
|
||||
.group a
|
||||
a a
|
||||
@@ -75,6 +75,8 @@
|
||||
i) e E
|
||||
u) e E
|
||||
y) e E
|
||||
|
||||
L06_) e e# // unstressed 'e' silent at start of word after a,e,o
|
||||
|
||||
_) ent' (AP4 ent
|
||||
_) enta' ,ent%a
|
||||
@@ -199,6 +201,10 @@ q k
|
||||
&) s (_S1 s
|
||||
|
||||
_) s' (AP2 s
|
||||
_) s (C@ %es
|
||||
_) s (hA s
|
||||
_) s (y s
|
||||
A_) s (C s
|
||||
|
||||
|
||||
.group t
|
||||
|
||||
+127
-188
@@ -1,131 +1,133 @@
|
||||
// Translation rules for Bengali
|
||||
|
||||
// Translation rules for Assamese
|
||||
// input by .
|
||||
// This file is UTF8 encoded
|
||||
|
||||
// Numbers
|
||||
// Bengali numbers are changed to latin characters before translation
|
||||
_0 S'unjO
|
||||
_1 '&k
|
||||
// Numbers are changed to latin characters before translation
|
||||
_0 X'unjO
|
||||
_1 'ek
|
||||
_2 d'uj
|
||||
_3 t'in
|
||||
_4 tS'ar
|
||||
_3 t'ini
|
||||
_4 tS#'ar'i
|
||||
_5 p'a~tS
|
||||
_6 tS#'Oj
|
||||
_7 S'at
|
||||
_8 'at.#
|
||||
_7 X'at
|
||||
_8 a~t.#
|
||||
_9 n'Oj
|
||||
|
||||
_2a d'u // with hundreds etc.
|
||||
_6a tS#'a
|
||||
_6a tS#'O
|
||||
_9a n'O
|
||||
|
||||
|
||||
_10 d'OS
|
||||
_11 '&garo
|
||||
_10 d@h
|
||||
_11 Ig#'a:ro
|
||||
_12 b'arO
|
||||
_13 t'erO
|
||||
_14 tS'oddO
|
||||
_14 tS#au'ddO
|
||||
_15 p'OnerO
|
||||
_16 S'olO
|
||||
_17 S'OterO
|
||||
_16 X'olO
|
||||
_17 X'OterO
|
||||
_18 'at.#arO
|
||||
_19 'uniS
|
||||
_19 'un'niS
|
||||
|
||||
_20 k'uri // or b'iS ??
|
||||
_20 b'iS
|
||||
_21 ek'uS
|
||||
_22 b'ajS
|
||||
_23 t'ejS
|
||||
_24 tS'ObbiS
|
||||
_25 p'O~tSiS
|
||||
_26 tSh'abbiS
|
||||
_27 Sat'aS
|
||||
_27 X'at'aS
|
||||
_28 'at.#aS
|
||||
_29 unOtr'iS
|
||||
_29 'unOtr'iS
|
||||
|
||||
_30 tr'iS
|
||||
_31 ekOtr'iS
|
||||
_32 bOtr'iS
|
||||
_33 tetr'iS
|
||||
_34 tSowtr'iS
|
||||
_35 pO~jtr'iS
|
||||
_31 'ek'Otr'iS
|
||||
_32 b'Otr'iS
|
||||
_33 t'etr'iS
|
||||
_34 tS'owtr'iS
|
||||
_35 p'O~jtr'iS
|
||||
_36 tS#'Otr'iS
|
||||
_37 Sa~itr'iS
|
||||
_38 at.tr'iS
|
||||
_37 X'a~i'tr'iS
|
||||
_38 'a~t.tr'iS
|
||||
_39 'unOtSOll'iS
|
||||
|
||||
_40 tSOll'iS
|
||||
_41 ektSOll'iS
|
||||
_42 biall'iS
|
||||
_43 tetall'iS
|
||||
_44 tSoall'iS
|
||||
_45 pO~jtall'iS
|
||||
_46 tSetSOll'iS
|
||||
_47 SatSOll'is
|
||||
_48 atSOll'iS
|
||||
_49 unOpO~tSaS
|
||||
_41 'ektSOll'iS
|
||||
_42 b'iall'iS
|
||||
_43 t'etall'iS
|
||||
_44 tS'oall'iS
|
||||
_45 p'O~jtall'iS
|
||||
_46 tS'etSO'll'iS
|
||||
_47 X'atSOll'is
|
||||
_48 'a~'tSOll'iS
|
||||
_49 'unOpO~tSaS
|
||||
|
||||
_50 pO~tS'aS
|
||||
_51 &kann'o
|
||||
_52 bajann'o
|
||||
_53 tepann'o
|
||||
_54 tSujann'o
|
||||
_55 pontSann'o
|
||||
_56 tS#apann'o
|
||||
_57 Satann'o
|
||||
_58 at.ann'o
|
||||
_59 unOS'at.
|
||||
_50 p'O~tS'aS
|
||||
_51 I'kann'o
|
||||
_52 b'ajann'o
|
||||
_53 t'epann'o
|
||||
_54 tS'ujann'o
|
||||
_55 p'ontSann'o
|
||||
_56 tS#'apann'o
|
||||
_57 X'atann'o
|
||||
_58 'at.ann'o
|
||||
_59 'unO'Xa:t.
|
||||
|
||||
|
||||
_60 s'at.
|
||||
_61 ekSOt.t.'i
|
||||
_62 baSOt.t.'i
|
||||
_63 teSOt.t.'i
|
||||
_64 tSowSOt.t.'i
|
||||
_65 pojSOt.t.'i
|
||||
_66 SeSOt.t.'i
|
||||
_67 SatSOt.t.'i
|
||||
_68 at.SOt.t.'i
|
||||
_6X sat.t.'i
|
||||
_69 unOSOtt'ur
|
||||
_60 sa:t.
|
||||
_61 'ek'XO't.t.'i
|
||||
_62 b'aXO't.t.'i
|
||||
_63 t'eXO't.t.'i
|
||||
_64 tS'ow'XO't.t.'i
|
||||
_65 p'oj'XO't.t.'i
|
||||
_66 S'eSOt.t.'i
|
||||
_67 Sa:tSOt'ti
|
||||
_68 'a~t.SOt.t.'i
|
||||
_6X s'at.t.'i
|
||||
_69 'unO'X'Ott'Or
|
||||
|
||||
_70 SOtt'Or
|
||||
_71 ekatt'Or
|
||||
_72 bahatt'Or
|
||||
_73 tehatt'Or
|
||||
_74 tSuhatt'Or
|
||||
_75 pOtSatt'Or
|
||||
_76 tS#ijatt'Or
|
||||
_77 Satatt'Or
|
||||
_78 at.att'Or
|
||||
_79 unOaS'i
|
||||
_70 X'Ott'Or
|
||||
_71 I'k#'Ott'Or
|
||||
_72 b'ahatt'Or
|
||||
_73 t'iatt'Or
|
||||
_74 tS'uhatt'Or
|
||||
_75 p'OX'at.t'Or
|
||||
_76 tS#'ijatt'Or
|
||||
_77 S'atatt'Or
|
||||
_78 'a~t.att'Or
|
||||
_79 'unOa'X'i
|
||||
|
||||
_80 aS'i
|
||||
_81 &kaS'i
|
||||
_82 beraS'i
|
||||
_83 teraS'i
|
||||
_84 tSuraS'i
|
||||
_85 po~tSaS'i
|
||||
_86 tS#ijaS'i
|
||||
_87 SataS'i
|
||||
_88 at.aS'i
|
||||
_89 ,unOnObb'oj
|
||||
_80 a:X'i
|
||||
_81 I'ka'X'i
|
||||
_82 b'ira'X'i
|
||||
_83 t'ira'X'i
|
||||
_84 tS'ura'X'i
|
||||
_85 p'o~tSa'X'i
|
||||
_86 tS#'ija'X'i
|
||||
_87 S'ataS'i
|
||||
_88 X'ata'S'i
|
||||
_89 'unOnObb'oj
|
||||
|
||||
_90 nObb'oj
|
||||
_91 &kanObb'oj
|
||||
_92 beranObb'oj
|
||||
_93 teranObb'oj
|
||||
_94 tSuranObb'oj
|
||||
_95 pOtSanObb'oj
|
||||
_96 tS#ijanObb'oj
|
||||
_97 SatanObb'oj
|
||||
_98 at.anObb'oj
|
||||
_99 niranObb'oj
|
||||
_91 I'kanObb'oj
|
||||
_92 b'ira'nObb'oj
|
||||
_93 t'ira:nObb'oj
|
||||
_94 tS'uranObb'oj
|
||||
_95 p'OtSanObb'oj
|
||||
_96 tS#'ijanObb'oj
|
||||
_97 X'atanObb'oj
|
||||
_98 'a~t.anObb'oj
|
||||
_99 n'iranObb'oj
|
||||
|
||||
_0C S'o
|
||||
_0C e'X'o
|
||||
_0M1 h'ajar
|
||||
_0M2 l'ak#
|
||||
_0M3 k'ot.i
|
||||
_0M4 'Orbud
|
||||
_dpt _d'Osomik_
|
||||
_dpt _d'OX'omik_
|
||||
|
||||
|
||||
// Single consonants
|
||||
@@ -133,7 +135,7 @@ _dpt _d'Osomik_
|
||||
খ k#O
|
||||
গ gO
|
||||
ঘ g#O
|
||||
ঙ 'uNO~
|
||||
ঙ 'uNgO~
|
||||
চ tSO
|
||||
ছ tShO // [h] to distinguish from [tS]
|
||||
জ JO
|
||||
@@ -154,46 +156,46 @@ _dpt _d'Osomik_
|
||||
ব bO
|
||||
ভ b#O
|
||||
ম mO
|
||||
য় Oj
|
||||
য ,ontostedZ'O
|
||||
র rO
|
||||
ড় r.O
|
||||
ড় r.O // (d. + nukta)
|
||||
ঢ় hr.O
|
||||
ঢ় hr.O // (d#. + nukta)
|
||||
ৰ rO
|
||||
ল lO
|
||||
ৱ wO
|
||||
শ t,aleboS:'O
|
||||
ষ m,ud#en:oS:'O
|
||||
স d,onteS:'O
|
||||
স d,onte'X:'O
|
||||
হ hO
|
||||
ৎ kh,Ond.ot'O
|
||||
ক্ষ k,ojmud#en:oS:'O
|
||||
ড় dOerO // (d. + nukta)
|
||||
ঢ় d#e hr.O // (d#. + nukta)
|
||||
য় ,ontosteOj
|
||||
ৎ kh,Ond.ot'O
|
||||
|
||||
|
||||
|
||||
// full vowels
|
||||
অ O
|
||||
আ a
|
||||
ই hrOS:o'i
|
||||
ঈ dirg#o'i
|
||||
ঈ d'i:rg#o'i
|
||||
উ hrOS:o'u
|
||||
ঊ dirg#o'u
|
||||
ঊ d'i:rg#o'u
|
||||
ঋ ri
|
||||
ও o
|
||||
ঔ ow
|
||||
|
||||
এ e $u+ // word 'it'
|
||||
ঐ oj $u+ // word 'that'
|
||||
ও o $u+ $brk // 'and'
|
||||
_এ e
|
||||
_ঐ oj
|
||||
_ও o
|
||||
|
||||
|
||||
|
||||
// combining vowel signs
|
||||
া 'akar
|
||||
ি r'oS:ikar
|
||||
ী d'irg#ikar
|
||||
ূ r'oS:ukar
|
||||
ু d'irg#ukar
|
||||
ি hrOS:o'ikar
|
||||
ী d'i:rg#ikar
|
||||
ূ hrOS:o'ukar
|
||||
ু d'i:rg#ukar
|
||||
ৃ r'ikar
|
||||
ে 'ekar
|
||||
ৈ 'ojkar
|
||||
@@ -208,116 +210,53 @@ _ও o
|
||||
় b'indu
|
||||
|
||||
$ d.Olar
|
||||
% SOtk'Ora
|
||||
% X'Otk'Ora
|
||||
+ jOg
|
||||
= SOman
|
||||
= X'Oman
|
||||
|
||||
|
||||
|
||||
// Punctuation
|
||||
। dVn.d.V
|
||||
। dVn.ri
|
||||
_, koma
|
||||
_? pr'oSnOtSihnO
|
||||
|
||||
// Pronouns
|
||||
আমি $u // main: I
|
||||
আমায় $u
|
||||
আমার $u
|
||||
|
||||
আমরা $u // we
|
||||
আমাদের $u
|
||||
ময $u // I, me
|
||||
আমি $u // us
|
||||
আমার $u // our
|
||||
|
||||
আপনি $u // you(formal)
|
||||
আপনাকে $u
|
||||
আপনার $u
|
||||
আপনাক $u
|
||||
|
||||
তুমি $u // you (informal)
|
||||
তোমায় $u
|
||||
তোমার $u
|
||||
তোমাদের $u
|
||||
|
||||
তুই $u // you (informal)
|
||||
তোকে $u
|
||||
তোমাক $u
|
||||
তয় $u // you (informal)
|
||||
তোক $u
|
||||
তোর $u
|
||||
|
||||
এ $u // he/she/it
|
||||
আপনি $u
|
||||
এটার $u
|
||||
এর $u
|
||||
|
||||
ইনি $u // they
|
||||
এনাকে $u
|
||||
এনার $u
|
||||
|
||||
ও $u // he/she/it
|
||||
সে $u
|
||||
ওর $u
|
||||
তার $u
|
||||
|
||||
ওরা $u // they
|
||||
তারা $u
|
||||
ওদের $u // unheṃ: them
|
||||
তাদের $u
|
||||
|
||||
এই $u // e:I this/it
|
||||
এটা $u // e:ta: this/it
|
||||
এটার $u // e:ta:'r this/it
|
||||
এর $u // e:r this/it
|
||||
|
||||
ওটা $u // o:ta: that
|
||||
ওটাকে $u // o:ta:ke: to that
|
||||
ওটার $u // o:ta:'r of that
|
||||
|
||||
ওগুলো $u // o:gu:lo: those
|
||||
ওগুলোকে $u // o:gu:lo:ke: to those
|
||||
ওগুলোর $u // o:gu:lo:'r of those
|
||||
সি $u // he
|
||||
তাই $u // she
|
||||
|
||||
|
||||
|
||||
// Prepositions/Postpositions
|
||||
মধ্যে $u // moddhe in
|
||||
উপর $u // upor on, above
|
||||
নীচে $u // niche below
|
||||
|
||||
পূর্ব্বে $u // purbe before, prior
|
||||
পর্য্যন্ত $u // parjonto till
|
||||
অব্দি $u // abdi till
|
||||
বিনা $u // bina without
|
||||
|
||||
|
||||
|
||||
// Questions
|
||||
কেন $u $pause // kano why interrogative particle
|
||||
কি $u $pause // ki what
|
||||
কোথায় $u $pause // kothaay where
|
||||
কখন $u $pause // kakhon when
|
||||
কে $u $pause // ke who
|
||||
কিয় $u $pause // kio why interrogative particle
|
||||
কি $u $pause // ki what
|
||||
কোত $u $pause // kot where
|
||||
কেতিয়া $u $pause // ketia when
|
||||
কোন $u $pause // kon who
|
||||
|
||||
// Conjunctions
|
||||
|
||||
এবং $u $pause // ebong: and
|
||||
আর $u $pause // aar: and
|
||||
অথবা $u $pause // athoba: or
|
||||
এরং $u $pause // ebong: and
|
||||
আরু $u $pause // aaru : and
|
||||
অথরা $u $pause // athoba: or
|
||||
কিন্তু $u $pause // kintu: but
|
||||
যদি $pause // jodi: if
|
||||
তবু $pause // tobu: still, yet
|
||||
তবে $pause // tabe: if...then
|
||||
তেতিয়া $pause // then
|
||||
অথচ $u // athacho: yet
|
||||
|
||||
|
||||
// Verbs
|
||||
|
||||
হয় $u
|
||||
|
||||
|
||||
ছিল $u // chilo: past aux
|
||||
ছিলেন $u // chilen
|
||||
|
||||
|
||||
করছি $u // korchi: continuous
|
||||
করছিলাম $u // korchilam: past indefinite
|
||||
করেছি $u // korechi: past
|
||||
|
||||
|
||||
// Exceptions
|
||||
এত &to
|
||||
এটা &ta // one piece, one
|
||||
|
||||
+167
-209
@@ -1,4 +1,4 @@
|
||||
|
||||
// Pronounciation rule for Assamese.
|
||||
// This file is UTF8 encoded
|
||||
|
||||
// letter groups:
|
||||
@@ -7,8 +7,6 @@
|
||||
// C consonants
|
||||
// Y vowel letters and vowel signs
|
||||
|
||||
|
||||
|
||||
.replace
|
||||
০ 0
|
||||
১ 1
|
||||
@@ -21,368 +19,328 @@
|
||||
৮ 8
|
||||
৯ 9
|
||||
|
||||
|
||||
// Vowels
|
||||
|
||||
|
||||
.group অ
|
||||
অ V
|
||||
অঁ O~
|
||||
অ্যা & // V,ja in [æmiba]
|
||||
অ V
|
||||
অঁ O~
|
||||
অ্যা & // V,ja in [æmiba]
|
||||
|
||||
|
||||
.group আ
|
||||
আ a
|
||||
আঁ a~
|
||||
আ a
|
||||
আঁ a~
|
||||
|
||||
.group ই
|
||||
ই i
|
||||
ইঁ i~
|
||||
ই i
|
||||
ইঁ i~
|
||||
|
||||
|
||||
.group ঈ
|
||||
ঈ i
|
||||
ঈঁ i~
|
||||
ঈ i
|
||||
ঈঁ i~
|
||||
|
||||
|
||||
.group উ
|
||||
উ u
|
||||
উঁ u~
|
||||
|
||||
উ u
|
||||
উঁ u~
|
||||
|
||||
.group ঊ
|
||||
ঊ u
|
||||
ঊঁ u~
|
||||
|
||||
ঊ u
|
||||
ঊঁ u~
|
||||
.group ঋ
|
||||
ঋ ri
|
||||
ঋঁ ri~
|
||||
|
||||
.group ঌ
|
||||
ঌ l-
|
||||
|
||||
ঋ ri
|
||||
|
||||
.group এ
|
||||
এ &
|
||||
এঁ &~
|
||||
|
||||
এ &
|
||||
এঁ &~
|
||||
|
||||
.group ঐ
|
||||
ঐ oj
|
||||
ঐঁ o~j
|
||||
|
||||
ঐ oj
|
||||
ঐঁ o~j
|
||||
|
||||
.group এ
|
||||
এ e
|
||||
এঁ e~
|
||||
এ e
|
||||
এঁ e~
|
||||
|
||||
এ্যা & // e,ja [ækademi]
|
||||
|
||||
এ্যা & // e,ja [ækademi]
|
||||
|
||||
.group ও
|
||||
ও o
|
||||
ওঁ o~
|
||||
|
||||
ও o
|
||||
ওঁ o~
|
||||
|
||||
.group ঔ
|
||||
ঔ ow
|
||||
ঔঁ o~w
|
||||
ঔ ow
|
||||
ঔঁ o~w
|
||||
|
||||
.group ও //??
|
||||
ও o:
|
||||
|
||||
|
||||
|
||||
ও o:
|
||||
|
||||
|
||||
// Vowel Signs
|
||||
|
||||
.group া
|
||||
া a
|
||||
াঁ a~
|
||||
|
||||
C) া a
|
||||
C) াঁ a~
|
||||
|
||||
.group ি
|
||||
ি i
|
||||
িঁ i~
|
||||
|
||||
C) ি i
|
||||
C) িঁ i~
|
||||
|
||||
.group ী
|
||||
ী i
|
||||
ীঁ i~
|
||||
C) ী i
|
||||
C) ীঁ i~
|
||||
|
||||
.group ূ
|
||||
ূ u
|
||||
ূঁ u~
|
||||
C) ূ u
|
||||
C) ূঁ u~
|
||||
|
||||
.group ু
|
||||
ু u
|
||||
ুঁ u~
|
||||
|
||||
C) ু u
|
||||
C) ুঁ u~
|
||||
|
||||
.group ৃ
|
||||
ৃ ri
|
||||
ৃঁ ri~
|
||||
C) ৃ r'i
|
||||
|
||||
|
||||
.group ে
|
||||
ে e
|
||||
েঁ e~
|
||||
েউ ew
|
||||
|
||||
C) ে e
|
||||
C) েঁ e~
|
||||
C) েউ ew
|
||||
|
||||
.group ৈ
|
||||
ৈ oj
|
||||
ৈঁ o~j
|
||||
|
||||
C) ৈ oj
|
||||
C) ৈঁ o~j
|
||||
|
||||
.group ো
|
||||
ো o
|
||||
োঁ o~
|
||||
|
||||
C) ো o
|
||||
C) োঁ o~
|
||||
|
||||
.group ৌ
|
||||
ৌ ow
|
||||
ৌঁ o~w
|
||||
|
||||
|
||||
C) ৌ ow
|
||||
C) ৌঁ o~w
|
||||
|
||||
|
||||
// Consonants
|
||||
|
||||
.group ক
|
||||
ক kV
|
||||
ক (B k
|
||||
ক kV
|
||||
ক (B k
|
||||
|
||||
|
||||
|
||||
.group খ
|
||||
খ k#V
|
||||
খ (B k#
|
||||
খ k#V
|
||||
খ (B k#
|
||||
|
||||
|
||||
.group গ
|
||||
গ gV
|
||||
গ (B g
|
||||
গ gV
|
||||
গ (B g
|
||||
|
||||
|
||||
.group ঘ
|
||||
ঘ g#V
|
||||
ঘ (B g#
|
||||
ঘ g#V
|
||||
ঘ (B g#
|
||||
|
||||
|
||||
.group ঙ
|
||||
ঙ NV
|
||||
ঙ্ (B N
|
||||
ঙ NV
|
||||
ঙ (B N
|
||||
|
||||
|
||||
.group চ
|
||||
চ tSV
|
||||
চ (B tS
|
||||
চ tSV
|
||||
চ (B tS
|
||||
|
||||
|
||||
.group ছ
|
||||
ছ tS#V
|
||||
ছ (B tS#
|
||||
ছ tS#V
|
||||
ছ (B tS#
|
||||
|
||||
|
||||
.group জ
|
||||
জ JV
|
||||
জ (B J
|
||||
জ JV
|
||||
জ (B J
|
||||
|
||||
জ্ব JV
|
||||
জ্ব (B J
|
||||
জ্ঞ ggo~
|
||||
জ্ঞ (B gg
|
||||
জ্ব JV
|
||||
জ্ব (B J
|
||||
জ্ঞ ggo~
|
||||
জ্ঞ (B gg
|
||||
|
||||
|
||||
.group ঝ
|
||||
ঝ J#V
|
||||
ঝ (B J#
|
||||
ঝ J#V
|
||||
ঝ (B J#
|
||||
|
||||
|
||||
.group ঞ
|
||||
ঞ nV
|
||||
ঞ্ (B n
|
||||
ঞ nV
|
||||
ঞ (B n
|
||||
|
||||
|
||||
.group ট
|
||||
ট t.V
|
||||
ট (B t.
|
||||
ট t.V
|
||||
ট (B t.
|
||||
|
||||
|
||||
.group ঠ
|
||||
ঠ t.#V
|
||||
ঠ (B t.#
|
||||
|
||||
ঠ t.#V
|
||||
ঠ (B t.#
|
||||
|
||||
.group ড
|
||||
ড d.V
|
||||
ড (B d.
|
||||
ড d.V
|
||||
ড (B d.
|
||||
|
||||
ড় r.V // nukta
|
||||
ড় (B r.
|
||||
|
||||
|
||||
.group ঢ
|
||||
ঢ d.#V
|
||||
ঢ (B d.#
|
||||
ঢ d.#V
|
||||
ঢ (B d.#
|
||||
|
||||
ঢ় hr.V
|
||||
ঢ় (B hr.
|
||||
|
||||
|
||||
|
||||
.group ণ
|
||||
ণ nV // should be [n.] if adjacent to t. or d. ?
|
||||
ণ (B n
|
||||
|
||||
ণ nV // should be [n.] if adjacent to t. or d. ?
|
||||
ণ (B n
|
||||
|
||||
|
||||
.group ত
|
||||
ত tV
|
||||
ত (B t
|
||||
ত tV
|
||||
ত (B t
|
||||
ত (_ to
|
||||
|
||||
|
||||
.group থ
|
||||
থ t#V
|
||||
থ (B t#
|
||||
থ t#V
|
||||
থ (B t#
|
||||
|
||||
|
||||
.group দ
|
||||
দ dV
|
||||
দ (B d
|
||||
দ dV
|
||||
দ (B d
|
||||
|
||||
|
||||
.group ধ
|
||||
ধ d#V
|
||||
ধ (B d#
|
||||
ধ d#V
|
||||
ধ (B d#
|
||||
|
||||
|
||||
.group ন
|
||||
ন nV
|
||||
ন (B n
|
||||
ন nV
|
||||
ন (B n
|
||||
|
||||
|
||||
.group প
|
||||
প pV
|
||||
প (B p
|
||||
প pV
|
||||
প (B p
|
||||
|
||||
|
||||
.group ফ
|
||||
ফ fV // or [p#] ?
|
||||
ফ (B f
|
||||
ফ fV // or [p#] ?
|
||||
ফ (B f
|
||||
|
||||
|
||||
.group ব
|
||||
ব bV
|
||||
ব (B b
|
||||
ব bV
|
||||
ব (B b
|
||||
|
||||
|
||||
.group ভ
|
||||
ভ b#V
|
||||
ভ (B b#
|
||||
ভ b#V
|
||||
ভ (B b#
|
||||
|
||||
|
||||
.group ম
|
||||
ম mV
|
||||
ম (B m
|
||||
|
||||
|
||||
.group য়
|
||||
য় jV
|
||||
য় (B j
|
||||
ম mV
|
||||
ম (B m
|
||||
|
||||
|
||||
.group য
|
||||
য dZV
|
||||
য (B dZ
|
||||
|
||||
য় jV // nukta
|
||||
য় (B j
|
||||
|
||||
্) য (C & // ব্যস্ত [bæsto]
|
||||
্) যা & // ব্যাকরণ [bækɔron]
|
||||
য dZV
|
||||
য (B dZ
|
||||
্) য (_ :O // double the previous consonant
|
||||
্) য (B_ :
|
||||
্) য (C & // ব্যস্ত [bæsto]
|
||||
্) যা & // ব্যাকরণ [bækɔron]
|
||||
|
||||
|
||||
.group র
|
||||
র rV
|
||||
র (B r
|
||||
.group ৰ
|
||||
ৰ rV
|
||||
ৰ (B r
|
||||
|
||||
|
||||
.group ল
|
||||
ল lV
|
||||
ল (B l
|
||||
ল lV
|
||||
ল (B l
|
||||
|
||||
.group ৱ
|
||||
ৱ waV
|
||||
ৱ (B wO
|
||||
|
||||
|
||||
.group শ
|
||||
শ SV // or [s] ?
|
||||
শ (B S
|
||||
শ SV // or [s] ?
|
||||
শ (B S
|
||||
|
||||
|
||||
শ (্ল s
|
||||
শ (্ল s
|
||||
|
||||
|
||||
.group ষ
|
||||
ষ SV
|
||||
ষ (B S
|
||||
ষ SV
|
||||
ষ (B S
|
||||
|
||||
|
||||
.group স
|
||||
স SV // or [s] ??
|
||||
স (B S
|
||||
|
||||
স (্থ s
|
||||
স (্ত s
|
||||
|
||||
_) স্ব SV // shb
|
||||
স X@ // or [s] ??
|
||||
স (B X
|
||||
স (্থ s
|
||||
স (্ত s
|
||||
স (্য s // সমস্যা
|
||||
_) স্ব SV // shb
|
||||
_) স্ব (B S
|
||||
|
||||
|
||||
.group হ
|
||||
হ hV
|
||||
হ (B h
|
||||
হ hV
|
||||
হ (B h
|
||||
হ (_ ho
|
||||
|
||||
.group ক্ষ
|
||||
ক্ষ k#k#V // or [k#:] ?
|
||||
ক্ষ (B k#k#
|
||||
|
||||
.group ড়
|
||||
ড় r.V // can be ড plus nukta
|
||||
ড় (B r.
|
||||
|
||||
.group ঢ়
|
||||
ঢ় hr.V // can be ঢ plus nukta
|
||||
ঢ় (B hr.
|
||||
|
||||
.group য়
|
||||
য় jV
|
||||
_) য় (B j
|
||||
য় (B // used to separate 2 vowels
|
||||
|
||||
|
||||
.group হ্ব
|
||||
হ্ব vV
|
||||
হ্ব (B v
|
||||
হ্ব vV
|
||||
হ্ব (B v
|
||||
|
||||
|
||||
.group ৎ
|
||||
ৎ t
|
||||
|
||||
|
||||
.group ড় // can be ড plus nukta
|
||||
ড় r.V
|
||||
ড় (B r.
|
||||
|
||||
|
||||
.group ঢ় // can be ঢ plus nukta
|
||||
ঢ় hr.V
|
||||
ঢ় (B hr.
|
||||
|
||||
|
||||
ৎ t
|
||||
|
||||
.group ঁ
|
||||
ঁ O~ // candrabindu, nasalize the previous vowel
|
||||
C) ঁ O~ // candrabindu, nasalize the previous vowel/Consonants
|
||||
|
||||
.group ং
|
||||
ং N // anusvara/onushshor
|
||||
|
||||
A) ং N // anusvara/onushshor
|
||||
C) ং N
|
||||
|
||||
.group ঃ // visarga/bishorgo
|
||||
ঃ // doubles the following consonant
|
||||
ঃ (_ H
|
||||
ঃ (_ H
|
||||
|
||||
.group ্ // virama/hoshonto
|
||||
্
|
||||
|
||||
.group ়
|
||||
় // nukta, modifies a consonant
|
||||
|
||||
|
||||
|
||||
|
||||
.group
|
||||
// obsolete letters
|
||||
ঋ r-
|
||||
ৠ r-
|
||||
ঌ l-
|
||||
ৡ l-
|
||||
ৃ r-
|
||||
ৄ r-
|
||||
ৢ l-
|
||||
ৣ l-
|
||||
|
||||
__) - (_D bij'og
|
||||
D_) - (_D bij'og
|
||||
// D_) - (_D bij'og
|
||||
|
||||
@@ -506,6 +506,7 @@ talk _^_EN
|
||||
teaser _^_EN
|
||||
tech _^_EN
|
||||
terminal _^_EN
|
||||
time _^_EN
|
||||
trip _^_EN
|
||||
tuner _^_EN
|
||||
unix _^_EN
|
||||
@@ -588,6 +589,7 @@ erst e:rst
|
||||
ersten e:rst@n
|
||||
erstmal e:rstma:l
|
||||
erzgebirg e:rtsg@bIrg
|
||||
expedient Ekspe:dI'Ent
|
||||
extravagant $1
|
||||
extrem Ekstr'e:m
|
||||
|
||||
|
||||
@@ -734,6 +734,7 @@ financ) ie (r I'e:
|
||||
@t) ien (_ 'i:@n
|
||||
&) iens (_ =I;@ns
|
||||
ient (_ I'Ent
|
||||
d) ient (_ i:nt
|
||||
&) ienz (_ I'Ents
|
||||
sch) ie (n i:
|
||||
@) ie (reX 'i:
|
||||
|
||||
+252
-40
File diff suppressed because it is too large
Load Diff
+222
-95
File diff suppressed because it is too large
Load Diff
+607
-606
File diff suppressed because it is too large
Load Diff
+15
-1
@@ -18,6 +18,16 @@
|
||||
೮ 8
|
||||
೯ 9
|
||||
|
||||
.L01 ಕ ಖ ಗ ಘ ಙ // velar
|
||||
|
||||
.L02 ಚ ಛ ಜ ಝ ಞ // palatal
|
||||
|
||||
.L03 ಟ ಠ ಡ ಢ ಣ // retroflex
|
||||
|
||||
.L04 ತ ಥ ದ ಧ ನ // dental
|
||||
|
||||
.L05 ಪ ಫ ಬ ಭ ಮ // labial
|
||||
|
||||
|
||||
.group ಕ
|
||||
ಕ ka
|
||||
@@ -215,7 +225,11 @@
|
||||
|
||||
.group 0xe0b2 // characters which start with UTF-8 bytes: [e0 b2]
|
||||
|
||||
ಂ m // anusvara (this should nasalize the vowel)
|
||||
ಂ(L01 N // anusvara (this should nasalize the vowel)
|
||||
ಂ(L02 n^
|
||||
ಂ(L03 n.
|
||||
ಂ(L04 n
|
||||
ಂ m
|
||||
|
||||
ಃ h // visarga
|
||||
|
||||
|
||||
+3
-3
@@ -403,7 +403,7 @@ zeten $alt
|
||||
boezemen $alt
|
||||
ademen $alt
|
||||
bliksemen $alt
|
||||
wasemen $alt
|
||||
wasemen v#a:s@m@n $alt
|
||||
|
||||
// words where -er is not a stressed verb ending
|
||||
|
||||
@@ -881,7 +881,7 @@ waaier $alt
|
||||
wakker $alt
|
||||
wapper $alt
|
||||
water $alt
|
||||
wedijver v#Ed'EIv@r $alt
|
||||
wedijver v#'EtEIv@r $alt
|
||||
weelder $alt
|
||||
wegwijzer $alt
|
||||
weiger $alt
|
||||
@@ -1805,7 +1805,7 @@ verderop $3
|
||||
vergezicht vErQ@zIxt
|
||||
verre vEr@
|
||||
verrekijker vEr@kEIk@r
|
||||
versa vErs'a:
|
||||
versa v'Erza:
|
||||
verste vErst@
|
||||
verte vErt@
|
||||
volledig $2
|
||||
|
||||
+4
-2
@@ -430,9 +430,10 @@
|
||||
_) ge (tenL02 Qe:
|
||||
_) geu QY:
|
||||
_) ge (ven Qe:
|
||||
_) ge (ver Qe:
|
||||
ge (vend_ Qe:
|
||||
ge (ver Qe:
|
||||
ge (val Q@
|
||||
_) ge (ving Qe:
|
||||
ge (ving Qe:
|
||||
|
||||
ge (sprek Q@ // in compounds
|
||||
|
||||
@@ -518,6 +519,7 @@
|
||||
&) iko (_ =iko:
|
||||
fam) i (lie 'i
|
||||
_) in (C@P2 'In
|
||||
_) in (a@P2 'In
|
||||
_) ing (eC_ IN // bewerkingen
|
||||
_) in (do In
|
||||
_) in (forma In
|
||||
|
||||
+2
-1
@@ -140,7 +140,8 @@ _⁃ odRa:Zka||'v||tvaRe||p'oml-tSki
|
||||
£ libRa
|
||||
¤ mena
|
||||
© kopiRajt
|
||||
® Registrovane:
|
||||
® RegistRovane:
|
||||
¶ 'oznatSenie||'odseku
|
||||
¥ jen
|
||||
− mi:nus
|
||||
± plus||m'i:nus
|
||||
|
||||
+14
-2
@@ -206,7 +206,7 @@ _1M3 orUko:d.ie:
|
||||
|
||||
_dpt _pul.l.i
|
||||
|
||||
// drop final [U] when followed by an ordinal suffix
|
||||
// drop final [U] when followed by an ordinal suffix or thousands
|
||||
_1o onR
|
||||
_2o irVn.d.
|
||||
_3o mu:nR
|
||||
@@ -239,18 +239,30 @@ _6Co aRUnu:R
|
||||
_7Co ;ez.Unu:R
|
||||
_8Co ;en.n.u:R
|
||||
|
||||
|
||||
|
||||
_#ம் a:m // ordinal suffix
|
||||
_#ல் il
|
||||
_#வது a:vVdU
|
||||
_#வதும் a:vVdUm
|
||||
_#வதுமாக a:vVdUma:gV
|
||||
|
||||
_#ஆம் a:m // including ஆ
|
||||
_#ஆவது a:vVdU
|
||||
_#ஆவதும் a:vVdUm
|
||||
_#ஆவதுமாக a:vVdUma:gV
|
||||
|
||||
_#-ம் a:m // ordinal suffix with hyphen
|
||||
_#-ல் il
|
||||
_#-வது a:vVdU
|
||||
_#-வதும் a:vVdUm
|
||||
_#-வதுமாக a:vVdUma:gV
|
||||
|
||||
_#-ஆம் a:m // including ஆ
|
||||
_#-ஆவது a:vVdU
|
||||
_#-ஆவதும் a:vVdUm
|
||||
_#-ஆவதுமாக a:vVdUma:gV
|
||||
|
||||
// English words
|
||||
tamil தமிழ் $text
|
||||
|
||||
@@ -387,6 +399,7 @@ tamil தமிழ் $text
|
||||
பாதிக்காம $alt
|
||||
பனியா $alt
|
||||
பாம் $alt
|
||||
போத $alt
|
||||
|
||||
|
||||
// initial த as [d]
|
||||
@@ -548,7 +561,6 @@ tamil தமிழ் $text
|
||||
போன் fo:n
|
||||
போனில் fo:nil
|
||||
//பைலை faIlaI
|
||||
பாதர் fa:dVr
|
||||
பாதரிடம் fa:dVrid.Vm
|
||||
பாதருடன் fa:dVrUd.Vn
|
||||
பாதரில்லாமல் fa:dVrilla:mVl
|
||||
|
||||
+73
-2
@@ -130,6 +130,9 @@
|
||||
// endings after போர்ட (board)
|
||||
.L31 ்_ ிங் ின ை ுக்க ில ும
|
||||
|
||||
// words after அர்த்த
|
||||
.L32 ராத்திரி ஜாம நிசி வேளை
|
||||
|
||||
|
||||
// consonants
|
||||
|
||||
@@ -270,7 +273,6 @@
|
||||
_) க (ால்ஃப் g
|
||||
_) கால்ப் ga:lf
|
||||
_) க (ிஃப்ட g
|
||||
_) கிட (ார git.
|
||||
_) க (ிடுகிடு g
|
||||
_) க (ிண்ணென்ற g
|
||||
_) க (ின்னஸ g
|
||||
@@ -601,9 +603,24 @@ _மன்மதக்) க (ுகை g
|
||||
_) க் (ளாஸ்_ g
|
||||
_) க்வ (A kw
|
||||
_) க் (வாலியர g
|
||||
_) க (ுட்கா g
|
||||
_) கோவர்த்த go:vVrddV#
|
||||
_) கோர்க (ாலாந்த go:rk
|
||||
_) குருமுக (ி gurumuk
|
||||
_) க (ோஸ்வாமி g
|
||||
_) க (ோசுவாமி g
|
||||
_) க (ிடார் g
|
||||
_) க (ிடாரை g
|
||||
_) க (ிடாரில g
|
||||
_) க (ிடாரின g
|
||||
_) க (ிடாரிட g
|
||||
//endsort
|
||||
|
||||
//sort
|
||||
_முட்) க (டிகார gV
|
||||
_தமிழ்) க (ூற k
|
||||
_து) க (ாராம k
|
||||
_நாகர்) க (ோவில k
|
||||
_கோபி) க kV#
|
||||
_ஸ்டா) க kV#
|
||||
_ஜமாய்) க kV#
|
||||
@@ -1351,6 +1368,12 @@ _வெனி) ச (ுவேல z
|
||||
_) ச (ௌஹான tS
|
||||
_ந) ச் (னு tS
|
||||
_கா) ச்மூச tSmu:tSV#
|
||||
அ) சு (வமேத s
|
||||
அ) சோக (் s.o:k
|
||||
_பாஸ்கரா) ச (ாரி tS
|
||||
_பரமா) ச (ாரி tS
|
||||
_மி) ச (ோராம z
|
||||
_) சு (வாதி s
|
||||
//endsort
|
||||
|
||||
|
||||
@@ -1785,6 +1808,8 @@ _நடுரோ) ட் (ல t.
|
||||
அ) ட்லாண்ட t.la:n.t.V# // atlant
|
||||
_) ட்விங்க (ிள t.wiNk
|
||||
_) ட்வ (ிட்டர t.w
|
||||
_ஸ்) டி (ரைக் t.
|
||||
_) ட (ூல t.
|
||||
//endsort
|
||||
|
||||
|
||||
@@ -2205,9 +2230,13 @@ _) தீர்க்க (_சுமங்கலி di:rggV
|
||||
_) த (ோஹா d
|
||||
_) தௌலதாப (ாத daUlVd.a:b
|
||||
_) த (்ராட்சை d
|
||||
_) த (ாவீத d
|
||||
_) த (ுரியானந்த d
|
||||
_) த (ாவூத d
|
||||
//endsort
|
||||
|
||||
//sort
|
||||
_அர்) த்த (_L32 ddV#
|
||||
_நிசப்) த dV#
|
||||
அனந்) த tV#
|
||||
_வசந்) த tV#
|
||||
@@ -3602,9 +3631,48 @@ _பெனசீர்_) ப (ுட்டோ b
|
||||
_) ப் (ளூஸ b
|
||||
_) ப் (ளோரிடா f
|
||||
_) ப் (ளௌஸ b
|
||||
_) புத்த (கய buddV
|
||||
_) பாப (ுஜி ba:p
|
||||
_) பிக (ார biH
|
||||
_) ப (ிஹார b
|
||||
_) ப (வ்விய bV
|
||||
_) பி (ளட் b
|
||||
L03) ப்ப (ூதகண bb
|
||||
L03) ப்ப (ூதங்கள bb
|
||||
_) புளூடூத் bl.u:t.u:T
|
||||
_) ப்ளூடூத் bl.u:t.u:T
|
||||
_) பி (ரவுன b
|
||||
_) ப் (ரவுன b
|
||||
_) ப (ட்டாச்சாரி bV
|
||||
_) ப (ிசினச b
|
||||
_) ப (ிசினெச b
|
||||
_) ப (ூசுக்த b
|
||||
_) ப (ேலூர b
|
||||
_) பி (ரஷர p
|
||||
_) பி (ரத்தியட்ச p
|
||||
_) பி (ரத்தியக்ஷ p
|
||||
_) ப (ோதத் b
|
||||
_) ப (ோதங்கள b
|
||||
_ஜுகல்_) ப (ந்தி bV
|
||||
_) புத்த (ியக்க putt
|
||||
_) ப (ாணம b
|
||||
_) ப (ாணத்த b
|
||||
//endsort
|
||||
|
||||
//sort
|
||||
_சுக) ப (ோக_ b
|
||||
_க) ப (ளீகர bV
|
||||
_ஜா) ப (ர fV
|
||||
_முரண்) ப (ாட p
|
||||
_வழி) ப (ார் p
|
||||
_வழி) ப (ோட p
|
||||
_பழி) ப (ோட p
|
||||
_துர்) ப்ப (ுத்தி bb
|
||||
அவிர்) ப்ப (ாக bb
|
||||
L03) ப்பி (ரேத pp
|
||||
L03) ப்பி (ரதே pp
|
||||
_துண்டு) ப்பி (ரசுர pp
|
||||
_கை) ப்பி (ரசுர pp
|
||||
_நீர்) ப pV#
|
||||
_ப்ரூ) ப fV#
|
||||
இடர்) ப pV#
|
||||
@@ -4405,7 +4473,7 @@ _சந்தேக) ப்ப (ுத்தி bb
|
||||
_) வி (யா v
|
||||
வி (யூக v
|
||||
இண்டர்) வி (யூ v
|
||||
|
||||
L03வ்) வி (யா v
|
||||
|
||||
.group ஶ
|
||||
ஶ SV
|
||||
@@ -4427,6 +4495,7 @@ _சந்தேக) ப்ப (ுத்தி bb
|
||||
_ம) ஸ்த (ூர zd
|
||||
அரி) ஸ (ோன z
|
||||
_சூய) ஸ zV#
|
||||
_ஹி) ஸ்ப (ுல்லா zb
|
||||
|
||||
.group ஹ
|
||||
ஹ HV
|
||||
@@ -4527,6 +4596,8 @@ _சந்தேக) ப்ப (ுத்தி bb
|
||||
இலேக்க (ிய le:gg
|
||||
இ (லேச
|
||||
இ (லையோலா
|
||||
இ (ராத்_
|
||||
இ (ராப்பகல
|
||||
//endsort
|
||||
|
||||
.group உ
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,3 @@
|
||||
name slovenian-test
|
||||
language sl
|
||||
|
||||
stressLength 160 150 240 240 240 240 300 320
|
||||
|
||||
@@ -15,6 +15,12 @@ phoneme E
|
||||
FMT(vowel/ee_1)
|
||||
endphoneme
|
||||
|
||||
phoneme e#
|
||||
vowel starttype #e endtype #e
|
||||
length 200
|
||||
ChangeIfStressed(e)
|
||||
ChangePhoneme(NULL)
|
||||
endphoneme
|
||||
|
||||
phoneme O
|
||||
vowel starttype #o endtype #o
|
||||
|
||||
@@ -286,3 +286,11 @@ phoneme z
|
||||
CALL base/z
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme l
|
||||
import_phoneme en/l
|
||||
endphoneme
|
||||
|
||||
phoneme x2
|
||||
import_phoneme af/x2
|
||||
endphoneme
|
||||
|
||||
@@ -359,11 +359,13 @@ phoneme t
|
||||
Vowelin f1=0 f2=1700 -300 300 f3=-100 80
|
||||
Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
|
||||
|
||||
IF nextPhW(isVowel) AND nextPh(isUnstressed) AND NOT next2PhW(n) THEN
|
||||
IF prevPhW(isVowel) THEN
|
||||
ChangePhoneme(t#)
|
||||
ELIF prevPhW(n) THEN
|
||||
WAV(ustop/t, 60)
|
||||
IF nextPhW(isVowel) AND nextPh(isUnstressed) THEN
|
||||
IF NOT next2PhW(n) OR nextPhW(3:) THEN
|
||||
IF prevPhW(isVowel) AND NOT prevPhW(aI@) THEN
|
||||
ChangePhoneme(t#)
|
||||
ELIF prevPhW(n) THEN
|
||||
WAV(ustop/t, 60)
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -277,3 +277,44 @@ phoneme g#
|
||||
endphoneme
|
||||
|
||||
|
||||
|
||||
// suggested by Prasenjit Sen, but perhaps not needed?
|
||||
// ml_rules changes [p], [t], [k] to [b], [d], [g] in non-initial
|
||||
// positions
|
||||
|
||||
phoneme p
|
||||
import_phoneme consonants/p-
|
||||
voicingswitch b
|
||||
|
||||
IF thisPh(isWordStart) THEN
|
||||
CALL base/p
|
||||
ELIF thisPh(isWordEnd) AND NOT thisPh(isFirstVowel) THEN
|
||||
ChangePhoneme(b)
|
||||
ENDIF
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme t
|
||||
import_phoneme base/t[
|
||||
voicingswitch d
|
||||
|
||||
IF thisPh(isWordStart) THEN
|
||||
CALL base/t
|
||||
ELIF thisPh(isWordEnd) AND NOT thisPh(isFirstVowel) THEN
|
||||
ChangePhoneme(d)
|
||||
ENDIF
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme k
|
||||
import_phoneme consonants/k-
|
||||
voicingswitch g
|
||||
|
||||
IF thisPh(isWordStart) THEN
|
||||
CALL base/k
|
||||
ELIF thisPh(isWordEnd) AND NOT thisPh(isFirstVowel) THEN
|
||||
ChangePhoneme(g)
|
||||
ENDIF
|
||||
endphoneme
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
|
||||
//====================================================
|
||||
// Manipuri, inherits from Bengali
|
||||
//====================================================
|
||||
|
||||
|
||||
phoneme a
|
||||
vowel starttype #a endtype #a
|
||||
length 225
|
||||
IF thisPh(isWordEnd) AND thisPh(isUnstressed) THEN
|
||||
FMT(vowel/a#_2)
|
||||
ENDIF
|
||||
FMT(vowel/a_3)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme i
|
||||
vowel starttype #i endtype #i
|
||||
length 210
|
||||
FMT(vowel/i_6)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme u
|
||||
vowel starttype #u endtype #u
|
||||
length 210
|
||||
FMT(vowel/u)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme e
|
||||
vowel starttype #e endtype #e
|
||||
length 210
|
||||
FMT(vowel/e)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme &
|
||||
vowel starttype #a endtype #a
|
||||
length 210
|
||||
FMT(vowel/&_2)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme o
|
||||
vowel starttype #o endtype #o
|
||||
length 210
|
||||
IF nextPhW(w) THEN
|
||||
length 170
|
||||
ENDIF
|
||||
FMT(vowel/o)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme O
|
||||
vowel starttype #o endtype #o
|
||||
length 200
|
||||
FMT(vowel/oo_5)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme tS
|
||||
vls pla afr sibilant
|
||||
voicingswitch dZ
|
||||
lengthmod 2
|
||||
Vowelin f1=0 f2=2300 200 400 f3=-100 80
|
||||
|
||||
IF nextPh(isPause2) THEN
|
||||
WAV(ustop/tsh_unasp2)
|
||||
ENDIF
|
||||
WAV(ustop/tsh_unasp2)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme tS#
|
||||
vls pla afr sibilant
|
||||
voicingswitch dZ
|
||||
lengthmod 2
|
||||
Vowelin f1=0 f2=2300 200 400 f3=-100 80
|
||||
|
||||
IF nextPh(isPause2) THEN
|
||||
WAV(ustop/tsh_)
|
||||
ENDIF
|
||||
WAV(ustop/tsh)
|
||||
endphoneme
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
phoneme ~
|
||||
virtual
|
||||
endphoneme
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
|
||||
//====================================================
|
||||
// Oriya, inherits from Bengali
|
||||
//====================================================
|
||||
|
||||
|
||||
phoneme V // inherent vowel, can be [O] or [o]
|
||||
vowel flag1 starttype #o endtype #o
|
||||
length 200
|
||||
|
||||
IF thisPh(isWordEnd) AND prevPhW(isNotVowel) THEN
|
||||
ChangePhoneme(O)
|
||||
ENDIF
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme a
|
||||
vowel starttype #a endtype #a
|
||||
length 225
|
||||
IF thisPh(isWordEnd) AND thisPh(isUnstressed) THEN
|
||||
FMT(vowel/a#_2)
|
||||
ENDIF
|
||||
FMT(vowel/a_3)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme i
|
||||
vowel starttype #i endtype #i
|
||||
length 210
|
||||
FMT(vowel/i_6)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme u
|
||||
vowel starttype #u endtype #u
|
||||
length 210
|
||||
FMT(vowel/u)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme e
|
||||
vowel starttype #e endtype #e
|
||||
length 210
|
||||
FMT(vowel/e)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme &
|
||||
vowel starttype #a endtype #a
|
||||
length 210
|
||||
FMT(vowel/&_2)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme o
|
||||
vowel starttype #o endtype #o
|
||||
length 210
|
||||
IF nextPhW(w) THEN
|
||||
length 170
|
||||
ENDIF
|
||||
FMT(vowel/o)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme O
|
||||
vowel starttype #o endtype #o
|
||||
length 200
|
||||
FMT(vowel/oo_5)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme tS
|
||||
vls pla afr sibilant
|
||||
voicingswitch dZ
|
||||
lengthmod 2
|
||||
Vowelin f1=0 f2=2300 200 400 f3=-100 80
|
||||
|
||||
IF nextPh(isPause2) THEN
|
||||
WAV(ustop/tsh_unasp2)
|
||||
ENDIF
|
||||
WAV(ustop/tsh_unasp2)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme tS#
|
||||
vls pla afr sibilant
|
||||
voicingswitch dZ
|
||||
lengthmod 2
|
||||
Vowelin f1=0 f2=2300 200 400 f3=-100 80
|
||||
|
||||
IF nextPh(isPause2) THEN
|
||||
WAV(ustop/tsh_)
|
||||
ENDIF
|
||||
WAV(ustop/tsh)
|
||||
endphoneme
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
phoneme ~
|
||||
virtual
|
||||
endphoneme
|
||||
|
||||
+16
-9
@@ -6,44 +6,44 @@
|
||||
|
||||
phoneme 1 // ngang tone: level
|
||||
stress
|
||||
Tone(32, 34, envelope/p_level, NULL)
|
||||
Tone(20,35, envelope/i_risefall,NULL) //40,5,envelope/p_level, NULL) //40 45
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme 2 // huyền tone: low falling
|
||||
stress
|
||||
Tone(35,20 , envelope/p_fall, NULL) //20
|
||||
Tone(10,20 , envelope/p_fall, NULL) //20
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme 3 // sắc Tone(rising
|
||||
stress
|
||||
Tone(40,60, envelope/p_rise, NULL) // 25 50
|
||||
Tone(45,80, envelope/p_rise, NULL) // 30 50
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme 4 // hỏi Tone(curve (dipping rising)
|
||||
stress
|
||||
Tone(30,50, envelope/p_rise, NULL) //envelope/vi_5amp) // 28,58
|
||||
Tone(45,50, envelope/p_fallrise,envelope/vi_5amp) // 28,58
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme 5 // ngã tone: broken (creaking rising)
|
||||
stress
|
||||
Tone(30,50, envelope/p_rise, NULL) //20,80, envelope/p_214, envelope/vi_5amp) // 28,58
|
||||
Tone(30,75, envelope/p_214, NULL) //20,80, envelope/p_214, envelope/vi_5amp) // 28,58
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme 6 // nặng Tone(drop (constricted)
|
||||
stress
|
||||
//length 150 // ignore because it make too short sound 75 // reduce the length of the vowel
|
||||
Tone(10,5, envelope/p_512,NULL) // envelope/vi_6amp)
|
||||
Tone(20,25, envelope/p_512,NULL) // envelope/vi_6amp) 10 5
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme 7 // Tone(1 (ngang) at end of clause
|
||||
stress
|
||||
Tone(40, 20, envelope/p_fall, NULL)
|
||||
Tone(40,42, envelope/p_fall, NULL) //20, 30, envelope/p_fall, NULL)
|
||||
endphoneme
|
||||
|
||||
// Redefine the length of vowels
|
||||
@@ -51,11 +51,13 @@ endphoneme
|
||||
phoneme i
|
||||
CALL vi/i
|
||||
length 150
|
||||
FMT(vowel/i#)
|
||||
endphoneme
|
||||
|
||||
phoneme E
|
||||
CALL vi/E
|
||||
length 150
|
||||
FMT(vowel/ee_1)
|
||||
endphoneme
|
||||
|
||||
phoneme a:
|
||||
@@ -76,8 +78,8 @@ endphoneme
|
||||
|
||||
phoneme O
|
||||
CALL vi/O
|
||||
length 150
|
||||
FMT(vowel/0)
|
||||
length 80
|
||||
FMT(vowel/oo_1)
|
||||
endphoneme
|
||||
|
||||
phoneme Oi
|
||||
@@ -94,4 +96,9 @@ endphoneme
|
||||
phoneme o
|
||||
CALL vi/o
|
||||
FMT(vowel/o_5)
|
||||
endphoneme
|
||||
|
||||
phoneme @:I
|
||||
CALL vi/@:I
|
||||
FMT(vdiph/y#y)
|
||||
endphoneme
|
||||
@@ -1934,6 +1934,11 @@ include ph_gujarati
|
||||
phonemetable as bn
|
||||
include ph_assamese
|
||||
|
||||
phonemetable or bn
|
||||
include ph_oriya
|
||||
|
||||
phonemetable mni bn
|
||||
include ph_manipuri
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#include <speak_lib.h>
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#include <windows.h>
|
||||
#define sleep(x) Sleep(1000*x)
|
||||
#endif
|
||||
|
||||
int callback(short* wav, int num, espeak_EVENT *pEv)
|
||||
{
|
||||
int cEv = 0;
|
||||
while (pEv->type) {
|
||||
cEv++;
|
||||
pEv++;
|
||||
}
|
||||
printf("callback, events: %d\n", cEv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
int nRate = espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 10000, NULL, 0);
|
||||
printf("nRate: %d\n", nRate);
|
||||
if (nRate < 0)
|
||||
return;
|
||||
espeak_SetSynthCallback(callback);
|
||||
espeak_SetParameter(espeakRATE, 175, 0);
|
||||
int rv;
|
||||
rv = espeak_Char('c');
|
||||
printf("rv: %d\n", rv);
|
||||
const char* sText = "tralalalallala";
|
||||
rv = espeak_Synth(sText, 100, 0, POS_CHARACTER, 0, 0, 0, 0);
|
||||
printf("rv: %d (full: %d, internal: %d)\n",
|
||||
rv, EE_BUFFER_FULL, EE_INTERNAL_ERROR);
|
||||
sleep(2); // 2 seconds
|
||||
puts("slept");
|
||||
espeak_Terminate();
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
Index: src/Makefile
|
||||
===================================================================
|
||||
--- src/Makefile (revision 364)
|
||||
+++ src/Makefile (working copy)
|
||||
@@ -18,6 +18,13 @@
|
||||
# Use SONAME_OPT=-Wl,h, on Solaris
|
||||
SONAME_OPT=-Wl,-soname,
|
||||
|
||||
+ifdef PLATFORM_WINDOWS
|
||||
+ LIB_NAME = libespeak.dll
|
||||
+else
|
||||
+ # On Windows not all source files are compiled
|
||||
+ non_windows_SOURCES = mbrowrap.cpp
|
||||
+endif
|
||||
+
|
||||
# Use EXTRA_LIBS=-lm on Solaris
|
||||
EXTRA_LIBS =
|
||||
|
||||
@@ -72,12 +79,12 @@
|
||||
|
||||
speak_SOURCES = speak.cpp compiledict.cpp dictionary.cpp intonation.cpp \
|
||||
readclause.cpp setlengths.cpp numbers.cpp synth_mbrola.cpp \
|
||||
- synthdata.cpp synthesize.cpp translate.cpp mbrowrap.cpp \
|
||||
+ synthdata.cpp synthesize.cpp translate.cpp $(non_windows_SOURCES) \
|
||||
tr_languages.cpp voices.cpp wavegen.cpp phonemelist.cpp klatt.cpp sonic.cpp
|
||||
|
||||
libespeak_SOURCES = speak_lib.cpp compiledict.cpp dictionary.cpp intonation.cpp \
|
||||
readclause.cpp setlengths.cpp numbers.cpp synth_mbrola.cpp \
|
||||
- synthdata.cpp synthesize.cpp translate.cpp mbrowrap.cpp \
|
||||
+ synthdata.cpp synthesize.cpp translate.cpp $(non_windows_SOURCES) \
|
||||
tr_languages.cpp voices.cpp wavegen.cpp phonemelist.cpp \
|
||||
espeak_command.cpp event.cpp fifo.cpp $(WAVE) debug.cpp klatt.cpp sonic.cpp
|
||||
|
||||
@@ -94,8 +101,14 @@
|
||||
LIBS3=-lstdc++ -L . -lespeak
|
||||
|
||||
CXXFLAGS=-O2
|
||||
+ifdef PLATFORM_WINDOWS
|
||||
+ CXXFLAGS += -DPLATFORM_WINDOWS -DNEED_STRUCT_TIMESPEC
|
||||
+ LDFLAGS += -static-libgcc -static-libstdc++
|
||||
+endif
|
||||
+ifdef DEBUG
|
||||
+ CXXFLAGS += -DDEBUG_ENABLED
|
||||
+endif
|
||||
|
||||
-
|
||||
all: $(BIN_NAME) $(LIB_NAME) $(STATIC_LIB_NAME) $(BIN2_NAME)
|
||||
|
||||
.cpp.o:
|
||||
@@ -116,9 +129,11 @@
|
||||
$(LIB_NAME): $(OBJS2)
|
||||
$(CXX) $(LDFLAGS) -shared $(SONAME_OPT)$(LIB_NAME).$(LIB_VERSION) -o $@ \
|
||||
$(OBJS2) $(LIBS2)
|
||||
- mv $(LIB_NAME) $(LIB_NAME).$(LIBTAG)
|
||||
- $(LN_SF) $(LIB_NAME).$(LIBTAG) $(LIB_NAME).$(LIB_VERSION)
|
||||
- $(LN_SF) $(LIB_NAME).$(LIB_VERSION) $(LIB_NAME)
|
||||
+ $(if $(PLATFORM_WINDOWS), , \
|
||||
+ mv $(LIB_NAME) $(LIB_NAME).$(LIBTAG); \
|
||||
+ $(LN_SF) $(LIB_NAME).$(LIBTAG) $(LIB_NAME).$(LIB_VERSION); \
|
||||
+ $(LN_SF) $(LIB_NAME).$(LIB_VERSION) $(LIB_NAME); \
|
||||
+ )
|
||||
|
||||
$(STATIC_LIB_NAME): $(OBJS2)
|
||||
$(AR) cqs $(STATIC_LIB_NAME) $(OBJS2)
|
||||
Index: src/speech.h
|
||||
===================================================================
|
||||
--- src/speech.h (revision 364)
|
||||
+++ src/speech.h (working copy)
|
||||
@@ -37,7 +37,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#define PLATFORM_POSIX
|
||||
#define PATHSEP '/'
|
||||
// USE_PORTAUDIO or USE_PULSEAUDIO are now defined in the makefile
|
||||
//#define USE_PORTAUDIO
|
||||
@@ -77,7 +76,14 @@
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#define N_PATH_HOME 230
|
||||
-#else
|
||||
+// sleep(seconds)
|
||||
+// Sleep(millisecond = 1/1000 s), windows api, kernel32.dll
|
||||
+// usleep(microseconds = 1/1000000 s)
|
||||
+#define sleep(x) Sleep(1000*x)
|
||||
+// we are lucky, in current code usleep is always used in multiplies of 1000
|
||||
+#define usleep(x) Sleep((x+500)/1000)
|
||||
+#else /* PLATFORM_POSIX */
|
||||
+#define PLATFORM_POSIX
|
||||
#define N_PATH_HOME 160
|
||||
#endif
|
||||
|
||||
Index: src/speak_lib.cpp
|
||||
===================================================================
|
||||
--- src/speak_lib.cpp (revision 364)
|
||||
+++ src/speak_lib.cpp (working copy)
|
||||
@@ -31,7 +31,13 @@
|
||||
#include "speech.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
-#ifndef PLATFORM_WINDOWS
|
||||
+
|
||||
+#ifdef PLATFORM_WINDOWS
|
||||
+#include <fcntl.h>
|
||||
+#include <io.h>
|
||||
+#include <windows.h>
|
||||
+#include <winreg.h>
|
||||
+#else /* PLATFORM_POSIX */
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
Index: src/wave.cpp
|
||||
===================================================================
|
||||
--- src/wave.cpp (revision 364)
|
||||
+++ src/wave.cpp (working copy)
|
||||
@@ -32,7 +32,9 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "portaudio.h"
|
||||
-#ifndef PLATFORM_WINDOWS
|
||||
+#ifdef PLATFORM_WINDOWS
|
||||
+#include <windows.h>
|
||||
+#else /* PLATFORM_POSIX */
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "wave.h"
|
||||
@@ -40,6 +42,14 @@
|
||||
|
||||
//<Definitions
|
||||
|
||||
+#ifdef NEED_STRUCT_TIMESPEC
|
||||
+#define HAVE_STRUCT_TIMESPEC 1
|
||||
+struct timespec {
|
||||
+ long tv_sec;
|
||||
+ long tv_nsec;
|
||||
+};
|
||||
+#endif /* HAVE_STRUCT_TIMESPEC */
|
||||
+
|
||||
enum {ONE_BILLION=1000000000};
|
||||
|
||||
#ifdef USE_PORTAUDIO
|
||||
Index: src/event.cpp
|
||||
===================================================================
|
||||
--- src/event.cpp (revision 364)
|
||||
+++ src/event.cpp (working copy)
|
||||
@@ -24,7 +24,9 @@
|
||||
|
||||
|
||||
//<includes
|
||||
+#ifndef PLATFORM_WINDOWS
|
||||
#include <unistd.h>
|
||||
+#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
Index: src/fifo.cpp
|
||||
===================================================================
|
||||
--- src/fifo.cpp (revision 364)
|
||||
+++ src/fifo.cpp (working copy)
|
||||
@@ -24,7 +24,9 @@
|
||||
|
||||
//<includes
|
||||
|
||||
+#ifndef PLATFORM_WINDOWS
|
||||
#include <unistd.h>
|
||||
+#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -0,0 +1,16 @@
|
||||
These are instructions to built the library on MS Windows, using msys and mingw.
|
||||
This library is fully functional, contrary to the library described
|
||||
in windows_dll directory.
|
||||
|
||||
To build exe file go to windows_cmd directory, to build sapi dll,
|
||||
go to windows_sapi directory.
|
||||
|
||||
- Use sources from src directory.
|
||||
- Have a ready to use portaudio v19 library (dll file is sufficient, here
|
||||
libportaudio-2.dll filename is assumed in a directory relative to espeak)
|
||||
- Copy portaudio.h file from your portaudio directory to src directory,
|
||||
overwriting the existing one. At the time of writing this is the same
|
||||
file as src/portaudio19.h distributed within espeak.
|
||||
|
||||
Make command:
|
||||
make libespeak.dll PLATFORM_WINDOWS=1 LIB_AUDIO="-L ../../portaudio/lib/.libs -lportaudio-2 -lwinmm"
|
||||
@@ -990,6 +990,10 @@ static wxString CompileAllDictionaries()
|
||||
|
||||
sprintf(fname_log,"%s%s",path_dsource,"dict_log");
|
||||
log = fopen(fname_log,"w");
|
||||
if(log != 0)
|
||||
{
|
||||
fprintf(log, "%s", utf8_bom);
|
||||
}
|
||||
sprintf(fname_log,"%s%s",path_dsource,"dict_phonemes");
|
||||
f_phused = fopen(fname_log,"w");
|
||||
|
||||
@@ -2407,6 +2411,9 @@ int CompileIf(int elif)
|
||||
else
|
||||
{
|
||||
error("Unexpected keyword '%s'",item_string);
|
||||
|
||||
if((strcmp(item_string, "phoneme") == 0) || (strcmp(item_string, "endphoneme") == 0))
|
||||
return(-1);
|
||||
}
|
||||
|
||||
// output the word
|
||||
|
||||
+12
-8
@@ -425,7 +425,8 @@ static int compile_line(char *linebuf, char *dict_line, int *hash)
|
||||
char *mnemptr;
|
||||
unsigned char flag_codes[100];
|
||||
char encoded_ph[200];
|
||||
unsigned char bad_phoneme[4];
|
||||
char bad_phoneme_str[4];
|
||||
int bad_phoneme;
|
||||
static char nullstring[] = {0};
|
||||
|
||||
text_not_phonemes = 0;
|
||||
@@ -660,17 +661,18 @@ static int compile_line(char *linebuf, char *dict_line, int *hash)
|
||||
}
|
||||
else
|
||||
{
|
||||
EncodePhonemes(phonetic,encoded_ph,bad_phoneme);
|
||||
EncodePhonemes(phonetic,encoded_ph,&bad_phoneme);
|
||||
if(strchr(encoded_ph,phonSWITCH) != 0)
|
||||
{
|
||||
flag_codes[n_flag_codes++] = BITNUM_FLAG_ONLY_S; // don't match on suffixes (except 's') when switching languages
|
||||
}
|
||||
|
||||
// check for errors in the phonemes codes
|
||||
if(bad_phoneme[0] != 0)
|
||||
if(bad_phoneme != 0)
|
||||
{
|
||||
// unrecognised phoneme, report error
|
||||
fprintf(f_log,"%5d: Bad phoneme [%c] (0x%x) in: %s %s\n",linenum,bad_phoneme[0],bad_phoneme[0],word,phonetic);
|
||||
bad_phoneme_str[utf8_out(bad_phoneme, bad_phoneme_str)] = 0;
|
||||
fprintf(f_log,"%5d: Bad phoneme [%s] (U+%x) in: %s %s\n",linenum,bad_phoneme_str,bad_phoneme,word,phonetic);
|
||||
error_count++;
|
||||
}
|
||||
}
|
||||
@@ -1194,7 +1196,8 @@ static char *compile_rule(char *input)
|
||||
int finish=0;
|
||||
char buf[80];
|
||||
char output[150];
|
||||
unsigned char bad_phoneme[4];
|
||||
int bad_phoneme;
|
||||
char bad_phoneme_str[4];
|
||||
|
||||
buf[0]=0;
|
||||
rule_cond[0]=0;
|
||||
@@ -1272,10 +1275,11 @@ static char *compile_rule(char *input)
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
EncodePhonemes(rule_phonemes,buf,bad_phoneme);
|
||||
if(bad_phoneme[0] != 0)
|
||||
EncodePhonemes(rule_phonemes,buf,&bad_phoneme);
|
||||
if(bad_phoneme != 0)
|
||||
{
|
||||
fprintf(f_log,"%5d: Bad phoneme [%c] in %s\n",linenum,bad_phoneme[0],input);
|
||||
bad_phoneme_str[utf8_out(bad_phoneme, bad_phoneme_str)] = 0;
|
||||
fprintf(f_log,"%5d: Bad phoneme [%s] (U+%x) in: %s\n",linenum,bad_phoneme_str,bad_phoneme,input);
|
||||
error_count++;
|
||||
}
|
||||
strcpy(output,buf);
|
||||
|
||||
+4
-5
@@ -348,8 +348,8 @@ int HashDictionary(const char *string)
|
||||
|
||||
|
||||
|
||||
const char *EncodePhonemes(const char *p, char *outptr, unsigned char *bad_phoneme)
|
||||
/***************************************************************************/
|
||||
const char *EncodePhonemes(const char *p, char *outptr, int *bad_phoneme)
|
||||
/******************************************************************/
|
||||
/* Translate a phoneme string from ascii mnemonics to internal phoneme numbers,
|
||||
from 'p' up to next blank .
|
||||
Returns advanced 'p'
|
||||
@@ -366,7 +366,7 @@ const char *EncodePhonemes(const char *p, char *outptr, unsigned char *bad_phone
|
||||
unsigned int mnemonic_word;
|
||||
|
||||
if(bad_phoneme != NULL)
|
||||
bad_phoneme[0] = 0;
|
||||
*bad_phoneme = 0;
|
||||
|
||||
// skip initial blanks
|
||||
while(isspace(*p))
|
||||
@@ -428,8 +428,7 @@ const char *EncodePhonemes(const char *p, char *outptr, unsigned char *bad_phone
|
||||
// not recognised, report and ignore
|
||||
if(bad_phoneme != NULL)
|
||||
{
|
||||
bad_phoneme[0] = *p;
|
||||
bad_phoneme[1] = 0;
|
||||
utf8_in(bad_phoneme, p);
|
||||
}
|
||||
*outptr++ = 0;
|
||||
return(p+1);
|
||||
|
||||
@@ -726,6 +726,7 @@ void MyFrame::OnTools(wxCommandEvent& event)
|
||||
int debug_flag=0;
|
||||
char fname_log[sizeof(path_dsource)+12];
|
||||
char err_fname[sizeof(path_home)+15];
|
||||
static const char utf8_bom[] = {0xef,0xbb,0xbf,0};
|
||||
|
||||
switch(event.GetId())
|
||||
{
|
||||
@@ -776,6 +777,10 @@ void MyFrame::OnTools(wxCommandEvent& event)
|
||||
case MENU_COMPILE_DICT:
|
||||
sprintf(fname_log,"%s%s",path_dsource,"dict_log");
|
||||
log = fopen(fname_log,"w");
|
||||
if(log != NULL)
|
||||
{
|
||||
fprintf(log, "%s", utf8_bom);
|
||||
}
|
||||
|
||||
LoadDictionary(translator, translator->dictionary_name, 0);
|
||||
if((err = CompileDictionary(path_dsource,translator->dictionary_name,log,err_fname,debug_flag)) < 0)
|
||||
|
||||
+18
-11
@@ -22,7 +22,9 @@
|
||||
|
||||
|
||||
//<includes
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -47,6 +49,7 @@ static sem_t my_sem_stop_is_required;
|
||||
static sem_t my_sem_stop_is_acknowledged;
|
||||
// my_thread: polls the audio duration and compares it to the duration of the first event.
|
||||
static pthread_t my_thread;
|
||||
static bool thread_inited;
|
||||
|
||||
static t_espeak_callback* my_callback = NULL;
|
||||
static int my_event_is_running=0;
|
||||
@@ -94,16 +97,16 @@ void event_init(void)
|
||||
assert(-1 != sem_init(&my_sem_stop_is_acknowledged, 0, 0));
|
||||
|
||||
pthread_attr_t a_attrib;
|
||||
if (pthread_attr_init (& a_attrib)
|
||||
|| pthread_attr_setdetachstate(&a_attrib, PTHREAD_CREATE_JOINABLE)
|
||||
|| pthread_create( &my_thread,
|
||||
& a_attrib,
|
||||
polling_thread,
|
||||
(void*)NULL))
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
if (pthread_attr_init (&a_attrib) == 0
|
||||
&& pthread_attr_setdetachstate(&a_attrib, PTHREAD_CREATE_JOINABLE) == 0)
|
||||
{
|
||||
thread_inited = (0 == pthread_create(&my_thread,
|
||||
&a_attrib,
|
||||
polling_thread,
|
||||
(void*)NULL));
|
||||
}
|
||||
assert(thread_inited);
|
||||
pthread_attr_destroy(&a_attrib);
|
||||
}
|
||||
//>
|
||||
@@ -126,7 +129,10 @@ ENTER("event_display");
|
||||
"MARK",
|
||||
"PLAY",
|
||||
"END",
|
||||
"MSG_TERMINATED"
|
||||
"MSG_TERMINATED",
|
||||
"PHONEME",
|
||||
"SAMPLERATE",
|
||||
"??"
|
||||
};
|
||||
|
||||
SHOW("event_display > event=0x%x\n",event);
|
||||
@@ -711,7 +717,7 @@ void event_terminate()
|
||||
{
|
||||
ENTER("event_terminate");
|
||||
|
||||
if (my_thread)
|
||||
if (thread_inited)
|
||||
{
|
||||
pthread_cancel(my_thread);
|
||||
pthread_join(my_thread,NULL);
|
||||
@@ -720,6 +726,7 @@ ENTER("event_terminate");
|
||||
sem_destroy(&my_sem_stop_is_required);
|
||||
sem_destroy(&my_sem_stop_is_acknowledged);
|
||||
init(); // purge event
|
||||
thread_inited = 0;
|
||||
}
|
||||
}
|
||||
//>
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
|
||||
//<includes
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
+8
-2
@@ -1506,7 +1506,10 @@ static int LookupNum2(Translator *tr, int value, const int control, char *ph_out
|
||||
else
|
||||
{
|
||||
// followed by hundreds or thousands etc
|
||||
sprintf(string,"_%da",value);
|
||||
if(tr->langopts.numbers2 & NUM2_ORDINAL_AND_THOUSANDS)
|
||||
sprintf(string, "_%do", value);
|
||||
else
|
||||
sprintf(string, "_%da", value);
|
||||
found = Lookup(tr, string, ph_digits);
|
||||
}
|
||||
|
||||
@@ -1612,7 +1615,10 @@ static int LookupNum2(Translator *tr, int value, const int control, char *ph_out
|
||||
else if(((control & 2) == 0) || ((tr->langopts.numbers & NUM_SWAP_TENS) != 0))
|
||||
{
|
||||
// followed by hundreds or thousands (or tens)
|
||||
sprintf(string,"_%da",units);
|
||||
if(tr->langopts.numbers2 & NUM2_ORDINAL_AND_THOUSANDS)
|
||||
sprintf(string, "_%do", units);
|
||||
else
|
||||
sprintf(string, "_%da", units);
|
||||
found = Lookup(tr, string, ph_digits);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -49,7 +49,7 @@
|
||||
#define phSINGLE_INSTN 0x1000 // this phoneme has a single instruction program, with an implicit Return
|
||||
#define phBRKAFTER 0x4000 // [*] add a post-pause
|
||||
|
||||
#define phNONSYLLABIC 0x100000 // don't count this vowel as a syllable when finding the stress position
|
||||
#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
|
||||
#define phRHOTIC 0x800000 // bit 23
|
||||
@@ -113,7 +113,7 @@ typedef struct {
|
||||
unsigned char end_type;
|
||||
unsigned char std_length; // for vowels, in mS/2; for phSTRESS phonemes, this is the stress/tone type
|
||||
unsigned char length_mod; // a length_mod group number, used to access length_mod_tab
|
||||
|
||||
|
||||
} PHONEME_TAB;
|
||||
|
||||
|
||||
@@ -155,13 +155,13 @@ typedef struct {
|
||||
|
||||
|
||||
|
||||
#define PH(c1,c2) (c2<<8)+c1 // combine two characters into an integer for phoneme name
|
||||
#define PH(c1,c2) (c2<<8)+c1 // combine two characters into an integer for phoneme name
|
||||
#define PH3(c1,c2,c3) (c3<<16)+(c2<<8)+c1
|
||||
#define PhonemeCode2(c1,c2) PhonemeCode((c2<<8)+c1)
|
||||
int LookupPhonemeString(const char *string);
|
||||
int PhonemeCode(unsigned int mnem);
|
||||
|
||||
const char *EncodePhonemes(const char *p, char *outptr, unsigned char *bad_phoneme);
|
||||
const char *EncodePhonemes(const char *p, char *outptr, int *bad_phoneme);
|
||||
void DecodePhonemes(const char *inptr, char *outptr);
|
||||
|
||||
extern const char *WordToString(unsigned int word);
|
||||
|
||||
+11
-2
@@ -32,7 +32,12 @@
|
||||
#include "speech.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
#include <winreg.h>
|
||||
#else /* PLATFORM_POSIX */
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@@ -552,7 +557,11 @@ static const char* label[] = {
|
||||
"SENTENCE",
|
||||
"MARK",
|
||||
"PLAY",
|
||||
"END"};
|
||||
"END",
|
||||
"MSG_TERMINATED",
|
||||
"PHONEME",
|
||||
"SAMPLERATE",
|
||||
"??" };
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.47.12 23.Sep.13";
|
||||
const char *version_string = "1.47.13 22.Oct.13";
|
||||
const int version_phdata = 0x014709;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
@@ -1486,6 +1486,7 @@ SetLengthMods(tr,3); // all equal
|
||||
SetupTranslator(tr,stress_lengths_ta, NULL);
|
||||
tr->letter_bits_offset = OFFSET_TAMIL;
|
||||
tr->langopts.numbers = NUM_OMIT_1_THOUSAND ;
|
||||
tr->langopts.numbers2 = NUM2_ORDINAL_AND_THOUSANDS;
|
||||
tr->langopts.param[LOPT_WORD_MERGE] = 1; // don't break vowels betwen words
|
||||
}
|
||||
else
|
||||
@@ -1582,6 +1583,7 @@ SetLengthMods(tr,3); // all equal
|
||||
break;
|
||||
|
||||
case L('u','r'): // Urdu
|
||||
case L('s','d'): // Sindhi
|
||||
{
|
||||
tr->letter_bits_offset = OFFSET_ARABIC;
|
||||
tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words
|
||||
|
||||
+3
-3
@@ -1310,7 +1310,7 @@ if(end_type & SUFX_UNPRON)
|
||||
prefix_flags = 1;
|
||||
if(found == 0)
|
||||
{
|
||||
end_type = TranslateRules(tr, wordx, phonemes, N_WORD_PHONEMES, end_phonemes, 0, dictionary_flags);
|
||||
end_type = TranslateRules(tr, wordx, phonemes, N_WORD_PHONEMES, end_phonemes, wflags & FLAG_HYPHEN_AFTER, dictionary_flags);
|
||||
|
||||
if(phonemes[0] == phonSWITCH)
|
||||
{
|
||||
@@ -1768,7 +1768,7 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa
|
||||
int ix;
|
||||
int sylimit; // max. number of syllables in a word to be combined with a preceding preposition
|
||||
const char *new_language;
|
||||
unsigned char bad_phoneme[4];
|
||||
int bad_phoneme;
|
||||
int word_flags;
|
||||
int word_copy_len;
|
||||
char word_copy[N_WORD_BYTES+1];
|
||||
@@ -1874,7 +1874,7 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa
|
||||
}
|
||||
else
|
||||
{
|
||||
EncodePhonemes(word,word_phonemes,bad_phoneme);
|
||||
EncodePhonemes(word,word_phonemes,&bad_phoneme);
|
||||
}
|
||||
flags = FLAG_FOUND;
|
||||
}
|
||||
|
||||
@@ -511,6 +511,7 @@ typedef struct {
|
||||
#define NUM2_ENGLISH_NUMERALS 0x8000
|
||||
#define NUM2_PERCENT_BEFORE 0x10000
|
||||
#define NUM2_OMIT_1_HUNDRED_ONLY 0x20000
|
||||
#define NUM2_ORDINAL_AND_THOUSANDS 0x40000
|
||||
// bits 1-4 use variant form of numbers before thousands,millions,etc.
|
||||
// bits 6-8 use different forms of thousand, million, etc (M MA MB)
|
||||
// bit9=(LANG=rw) say "thousand" and "million" before its number, not after
|
||||
@@ -521,6 +522,7 @@ typedef struct {
|
||||
// bit15=(LANG=ne) speak (non-replaced) English numerals in English
|
||||
// bit16=(LANG=si) say "%" before the number
|
||||
// bit17=(LANG=ml) omit "one" before hundred only if there are no previous digits
|
||||
// bit18=(LANG=ta) same variant for ordinals and thousands (#o = #a)
|
||||
int numbers2;
|
||||
|
||||
#define BREAK_THOUSANDS 0x49249248
|
||||
|
||||
+75
-63
@@ -31,7 +31,10 @@
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
#include "portaudio.h"
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "wave.h"
|
||||
@@ -39,6 +42,15 @@
|
||||
|
||||
//<Definitions
|
||||
|
||||
#ifdef NEED_STRUCT_TIMESPEC
|
||||
#define HAVE_STRUCT_TIMESPEC 1
|
||||
struct timespec {
|
||||
long tv_sec;
|
||||
long tv_nsec;
|
||||
};
|
||||
#endif /* HAVE_STRUCT_TIMESPEC */
|
||||
|
||||
|
||||
enum {ONE_BILLION=1000000000};
|
||||
|
||||
#ifdef USE_PORTAUDIO
|
||||
@@ -53,8 +65,8 @@ enum {ONE_BILLION=1000000000};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_PULSEAUDIO
|
||||
// create some wrappers for runtime detection
|
||||
|
||||
@@ -203,8 +215,8 @@ static t_wave_callback* my_callback_is_output_enabled=NULL;
|
||||
#define BUFFER_LENGTH (MAX_SAMPLE_RATE*2*sizeof(uint16_t))
|
||||
//#define THRESHOLD (BUFFER_LENGTH/5)
|
||||
static char myBuffer[BUFFER_LENGTH];
|
||||
static char* myRead=NULL;
|
||||
static char* myWrite=NULL;
|
||||
static char* myRead=NULL;
|
||||
static char* myWrite=NULL;
|
||||
static int out_channels=1;
|
||||
static int my_stream_could_start=0;
|
||||
static int wave_samplerate;
|
||||
@@ -223,7 +235,7 @@ static PaError pa_init_err=0;
|
||||
|
||||
// time measurement
|
||||
// The read and write position audio stream in the audio stream are measured in ms.
|
||||
//
|
||||
//
|
||||
// * When the stream is opened, myReadPosition and myWritePosition are cleared.
|
||||
// * myWritePosition is updated in wave_write.
|
||||
// * myReadPosition is updated in pa_callback (+ sample delay).
|
||||
@@ -275,12 +287,12 @@ static void start_stream()
|
||||
PaError err;
|
||||
SHOW_TIME("start_stream");
|
||||
|
||||
my_stream_could_start=0;
|
||||
my_stream_could_start=0;
|
||||
mInCallbackFinishedState = false;
|
||||
|
||||
err = Pa_StartStream(pa_stream);
|
||||
SHOW("start_stream > Pa_StartStream=%d (%s)\n", err, Pa_GetErrorText(err));
|
||||
|
||||
|
||||
#if USE_PORTAUDIO == 19
|
||||
if(err == paStreamIsNotStopped)
|
||||
{
|
||||
@@ -337,7 +349,7 @@ static int pa_callback(void *inputBuffer, void *outputBuffer,
|
||||
memcpy(outputBuffer, myRead, aUsedMem);
|
||||
}
|
||||
char* p = (char*)outputBuffer + aUsedMem;
|
||||
memset(p, 0, n - aUsedMem);
|
||||
memset(p, 0, n - aUsedMem);
|
||||
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t));
|
||||
myRead = aWrite;
|
||||
}
|
||||
@@ -367,7 +379,7 @@ static int pa_callback(void *inputBuffer, void *outputBuffer,
|
||||
myRead = myBuffer + aRest;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
SHOW_TIME("pa_callback > underflow");
|
||||
aResult=1; // paComplete;
|
||||
|
||||
@@ -387,7 +399,7 @@ static int pa_callback(void *inputBuffer, void *outputBuffer,
|
||||
|
||||
size_t aUsedMem = aTopMem + aRest;
|
||||
char* p = (char*)outputBuffer + aUsedMem;
|
||||
memset(p, 0, n - aUsedMem);
|
||||
memset(p, 0, n - aUsedMem);
|
||||
// myReadPosition += aUsedMem/(out_channels*sizeof(uint16_t));
|
||||
myRead = aWrite;
|
||||
}
|
||||
@@ -498,8 +510,8 @@ static int wave_open_sound()
|
||||
//paClipOff | paDitherOff,
|
||||
paNoFlag,
|
||||
pa_callback, (void *)userdata);
|
||||
|
||||
SHOW("wave_open_sound > Pa_OpenDefaultStream(1): err=%d (%s)\n",err, Pa_GetErrorText(err));
|
||||
|
||||
SHOW("wave_open_sound > Pa_OpenDefaultStream(1): err=%d (%s)\n",err, Pa_GetErrorText(err));
|
||||
|
||||
if(err == paInvalidChannelCount)
|
||||
{
|
||||
@@ -544,7 +556,7 @@ static int wave_open_sound()
|
||||
// paClipOff | paDitherOff,
|
||||
pa_callback,
|
||||
(void *)userdata);
|
||||
if ((err!=paNoError)
|
||||
if ((err!=paNoError)
|
||||
&& (err!=paInvalidChannelCount)) //err==paUnanticipatedHostError
|
||||
{
|
||||
fprintf(stderr, "wave_open_sound > Pa_OpenStream : err=%d (%s)\n",err,Pa_GetErrorText(err));
|
||||
@@ -600,7 +612,7 @@ static void update_output_parameters(int selectedDevice, const PaDeviceInfo *dev
|
||||
myOutputParameters.channelCount = 1;
|
||||
myOutputParameters.sampleFormat = paInt16;
|
||||
|
||||
// Latency greater than 100ms for avoiding glitches
|
||||
// Latency greater than 100ms for avoiding glitches
|
||||
// (e.g. when moving a window in a graphical desktop)
|
||||
// deviceInfo = Pa_GetDeviceInfo(selectedDevice);
|
||||
if (deviceInfo)
|
||||
@@ -654,15 +666,15 @@ static void select_device(const char* the_api)
|
||||
for( i=0; i<numDevices; i++ )
|
||||
{
|
||||
deviceInfo = Pa_GetDeviceInfo( i );
|
||||
|
||||
|
||||
if (deviceInfo == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo( deviceInfo->hostApi );
|
||||
|
||||
|
||||
if (hostInfo && hostInfo->type == paALSA)
|
||||
{
|
||||
{
|
||||
// Check (once) the default output device
|
||||
if (defaultAlsaIndex == numDevices)
|
||||
{
|
||||
@@ -671,23 +683,23 @@ static void select_device(const char* the_api)
|
||||
update_output_parameters(defaultAlsaIndex, deviceInfo);
|
||||
if (Pa_IsFormatSupported(NULL, &myOutputParameters, wave_samplerate) == 0)
|
||||
{
|
||||
SHOW( "select_device > ALSA (default), name=%s (#%d)\n", deviceInfo->name, defaultAlsaIndex);
|
||||
SHOW( "select_device > ALSA (default), name=%s (#%d)\n", deviceInfo->name, defaultAlsaIndex);
|
||||
selectedIndex = defaultAlsaIndex;
|
||||
selectedDeviceInfo = deviceInfo;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if the default output device does not match,
|
||||
// look for the device with the highest number of output channels
|
||||
|
||||
// if the default output device does not match,
|
||||
// look for the device with the highest number of output channels
|
||||
SHOW( "select_device > ALSA, i=%d (numDevices=%d)\n", i, numDevices);
|
||||
|
||||
|
||||
update_output_parameters(i, deviceInfo);
|
||||
|
||||
|
||||
if (Pa_IsFormatSupported(NULL, &myOutputParameters, wave_samplerate) == 0)
|
||||
{
|
||||
SHOW( "select_device > ALSA, name=%s (#%d)\n", deviceInfo->name, i);
|
||||
|
||||
|
||||
if (!selectedDeviceInfo
|
||||
|| (selectedDeviceInfo->maxOutputChannels < deviceInfo->maxOutputChannels))
|
||||
{
|
||||
@@ -703,14 +715,14 @@ static void select_device(const char* the_api)
|
||||
{
|
||||
update_output_parameters(selectedIndex, selectedDeviceInfo);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
i = Pa_GetDefaultOutputDevice();
|
||||
deviceInfo = Pa_GetDeviceInfo( i );
|
||||
update_output_parameters(i, deviceInfo);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//>
|
||||
@@ -798,18 +810,18 @@ void* wave_open(const char* the_api)
|
||||
//<copyBuffer
|
||||
|
||||
|
||||
static size_t copyBuffer(char* dest, char* src, const size_t theSizeInBytes)
|
||||
{
|
||||
static size_t copyBuffer(char* dest, char* src, const size_t theSizeInBytes)
|
||||
{
|
||||
size_t bytes_written = 0;
|
||||
unsigned int i = 0;
|
||||
uint16_t* a_dest = NULL;
|
||||
uint16_t* a_src = NULL;
|
||||
|
||||
|
||||
if ((src != NULL) && dest != NULL)
|
||||
{
|
||||
{
|
||||
// copy for one channel (mono)?
|
||||
if(out_channels==1)
|
||||
{
|
||||
{
|
||||
SHOW("copyBuffer > 1 channel > memcpy %x (%d bytes)\n", (int)myWrite, theSizeInBytes);
|
||||
memcpy(dest, src, theSizeInBytes);
|
||||
bytes_written = theSizeInBytes;
|
||||
@@ -820,7 +832,7 @@ static size_t copyBuffer(char* dest, char* src, const size_t theSizeInBytes)
|
||||
i = 0;
|
||||
a_dest = (uint16_t* )dest;
|
||||
a_src = (uint16_t* )src;
|
||||
|
||||
|
||||
for(i=0; i<theSizeInBytes/2; i++)
|
||||
{
|
||||
a_dest[2*i] = a_src[i];
|
||||
@@ -829,8 +841,8 @@ static size_t copyBuffer(char* dest, char* src, const size_t theSizeInBytes)
|
||||
bytes_written = 2*theSizeInBytes;
|
||||
} // end if(out_channels==1)
|
||||
} // end if ((src != NULL) && dest != NULL)
|
||||
|
||||
return bytes_written;
|
||||
|
||||
return bytes_written;
|
||||
}
|
||||
|
||||
//>
|
||||
@@ -843,7 +855,7 @@ size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSiz
|
||||
// space in ringbuffer for the sample needed: 1x mono channel but 2x for 1 stereo channel
|
||||
size_t bytes_to_write = (out_channels==1) ? theSize : theSize*2;
|
||||
my_stream_could_start = 0;
|
||||
|
||||
|
||||
if(pa_stream == NULL)
|
||||
{
|
||||
SHOW_TIME("wave_write > wave_open_sound\n");
|
||||
@@ -859,16 +871,16 @@ size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSiz
|
||||
my_stream_could_start = 1;
|
||||
}
|
||||
assert(BUFFER_LENGTH >= bytes_to_write);
|
||||
|
||||
|
||||
if (myWrite >= myBuffer + BUFFER_LENGTH)
|
||||
{
|
||||
myWrite = myBuffer;
|
||||
} // end if (myWrite >= myBuffer + BUFFER_LENGTH)
|
||||
|
||||
|
||||
size_t aTotalFreeMem=0;
|
||||
char* aRead = myRead;
|
||||
SHOW("wave_write > aRead=%x, myWrite=%x\n", (int)aRead, (int)myWrite);
|
||||
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (my_callback_is_output_enabled && (0==my_callback_is_output_enabled()))
|
||||
@@ -876,9 +888,9 @@ size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSiz
|
||||
SHOW_TIME("wave_write > my_callback_is_output_enabled: no!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
aRead = myRead;
|
||||
|
||||
|
||||
// write pointer is before read pointer?
|
||||
if (myWrite >= aRead)
|
||||
{
|
||||
@@ -888,27 +900,27 @@ size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSiz
|
||||
{
|
||||
aTotalFreeMem = aRead - myWrite;
|
||||
} // end if (myWrite >= aRead)
|
||||
|
||||
|
||||
if (aTotalFreeMem>1)
|
||||
{
|
||||
// -1 because myWrite must be different of aRead
|
||||
// otherwise buffer would be considered as empty
|
||||
aTotalFreeMem -= 1;
|
||||
} // end if (aTotalFreeMem>1)
|
||||
|
||||
|
||||
if (aTotalFreeMem >= bytes_to_write)
|
||||
{
|
||||
break;
|
||||
} // end if (aTotalFreeMem >= bytes_to_write)
|
||||
|
||||
|
||||
//SHOW_TIME("wave_write > wait");
|
||||
SHOW("wave_write > wait: aTotalFreeMem=%d\n", aTotalFreeMem);
|
||||
SHOW("wave_write > aRead=%x, myWrite=%x\n", (int)aRead, (int)myWrite);
|
||||
usleep(10000);
|
||||
} // end while (1)
|
||||
|
||||
|
||||
aRead = myRead;
|
||||
|
||||
|
||||
// write pointer is ahead the read pointer?
|
||||
if (myWrite >= aRead)
|
||||
{
|
||||
@@ -945,17 +957,17 @@ size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSiz
|
||||
SHOW_TIME("wave_write > myWrite <= aRead");
|
||||
myWrite += copyBuffer(myWrite, theMono16BitsWaveBuffer, theSize);
|
||||
} // end if (myWrite >= aRead)
|
||||
|
||||
|
||||
bytes_written = bytes_to_write;
|
||||
myWritePosition += theSize/sizeof(uint16_t); // add number of samples
|
||||
|
||||
|
||||
if (my_stream_could_start && (get_used_mem() >= out_channels * sizeof(uint16_t) * FRAMES_PER_BUFFER))
|
||||
{
|
||||
start_stream();
|
||||
} // end if (my_stream_could_start && (get_used_mem() >= out_channels * sizeof(uint16_t) * FRAMES_PER_BUFFER))
|
||||
|
||||
|
||||
SHOW_TIME("wave_write > LEAVE");
|
||||
|
||||
|
||||
return bytes_written;
|
||||
}
|
||||
|
||||
@@ -974,7 +986,7 @@ int wave_close(void* theHandler)
|
||||
SHOW_TIME("wave_close > LEAVE (NULL stream)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if( Pa_IsStreamStopped( pa_stream ) )
|
||||
{
|
||||
SHOW_TIME("wave_close > LEAVE (stopped)");
|
||||
@@ -986,7 +998,7 @@ int wave_close(void* theHandler)
|
||||
SHOW_TIME("wave_close > LEAVE (NULL stream)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if( Pa_StreamActive( pa_stream ) == false && mInCallbackFinishedState == false )
|
||||
{
|
||||
SHOW_TIME("wave_close > LEAVE (not active)");
|
||||
@@ -1002,20 +1014,20 @@ int wave_close(void* theHandler)
|
||||
SHOW_TIME("wave_close > LEAVE (stopStreamCount)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Comment from Audacity-1.2.4b adapted to the eSpeak context.
|
||||
|
||||
// Comment from Audacity-1.2.4b adapted to the eSpeak context.
|
||||
//
|
||||
// We got here in one of two ways:
|
||||
//
|
||||
// 1. The calling program calls the espeak_Cancel function and we
|
||||
// therefore want to stop as quickly as possible.
|
||||
// 1. The calling program calls the espeak_Cancel function and we
|
||||
// therefore want to stop as quickly as possible.
|
||||
// So we use AbortStream(). If this is
|
||||
// the case the portaudio stream is still in the Running state
|
||||
// (see PortAudio state machine docs).
|
||||
//
|
||||
// 2. The callback told PortAudio to stop the stream since it had
|
||||
// reached the end of the selection.
|
||||
// The event polling thread discovered this by noticing that
|
||||
// reached the end of the selection.
|
||||
// The event polling thread discovered this by noticing that
|
||||
// wave_is_busy() returned false.
|
||||
// wave_is_busy() (which calls Pa_GetStreamActive()) will not return
|
||||
// false until all buffers have finished playing, so we can call
|
||||
@@ -1030,7 +1042,7 @@ int wave_close(void* theHandler)
|
||||
// call StopStream if the callback brought us here, and AbortStream
|
||||
// if the user brought us here.
|
||||
//
|
||||
|
||||
|
||||
#if (USE_PORTAUDIO == 19)
|
||||
if (pa_stream)
|
||||
{
|
||||
@@ -1114,14 +1126,14 @@ int wave_is_busy(void* theHandler)
|
||||
if (pa_stream)
|
||||
{
|
||||
#if USE_PORTAUDIO == 18
|
||||
active = Pa_StreamActive(pa_stream)
|
||||
active = Pa_StreamActive(pa_stream)
|
||||
&& (mInCallbackFinishedState == false);
|
||||
#else
|
||||
active = Pa_IsStreamActive(pa_stream)
|
||||
&& (mInCallbackFinishedState == false);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
SHOW("wave_is_busy: %d\n",active);
|
||||
|
||||
|
||||
@@ -1160,7 +1172,7 @@ int wave_get_remaining_time(uint32_t sample, uint32_t* time)
|
||||
|
||||
if (!time || !pa_stream)
|
||||
{
|
||||
SHOW("event get_remaining_time> %s\n","audio device not available");
|
||||
SHOW("event get_remaining_time> %s\n","audio device not available");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1246,7 +1258,7 @@ void add_time_in_ms(struct timespec *ts, int time_in_ms)
|
||||
{
|
||||
SHOW("event > add_time_in_ms ns: %d sec %Lu nsec \n", ts->tv_sec, t_ns);
|
||||
ts->tv_sec += 1;
|
||||
t_ns -= ONE_BILLION;
|
||||
t_ns -= ONE_BILLION;
|
||||
}
|
||||
ts->tv_nsec = (long int)t_ns;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user