Browse Source

[1.46.35]

Added error detection in espeak_Synchronize().
Compile Phonemes: fixed resampling of WAV files to eSpeak's sample rate (needs 'sox').
Language changes: pt, en, fa.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@301 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 12 years ago
parent
commit
62e163701b

+ 16
- 3
dictsource/an_list View File

@@ -19,11 +19,11 @@ n Ene
ñ En^e
p pe
q ku
r ERR2e
r ERR2e
s Ese
t te
u u
v ,be||b'aIksa
v ,be||b'aSa
w ,be||d'Ople
x Se
z Teta
@@ -70,7 +70,10 @@ _7C sjEteTj'Entos
_8C gwitoTj'Entos
_9C nowTj'Entos
_0M1 m'il
_0M2 mil^'ones
_0M2 mil^'ons
_1M2 un||mil^'on
_0M4 bil^'ons
_1M4 un||bil^'on

_0and i
_dpt kon
@@ -78,3 +81,13 @@ _dpt kon

// unstressed words
lo $u
la $u
los $u
las $u
ne $u
nes $u
me $u
te $u
se $u
le $u
les $u

+ 4
- 4
dictsource/dict_phonemes View File

@@ -103,7 +103,7 @@ p Q r R s s; t T
ts v x z


Dictionary en_dict 2013-02-12
Dictionary en_dict 2013-02-13

0 0# 3 3: @ @- @2 @5
@L a a# A: A@ aa aI aI3
@@ -377,7 +377,7 @@ S s; S; t t; tS ts tS;
ts; v w x z Z Z;


Dictionary pt_dict 2013-02-11
Dictionary pt_dict 2013-02-14

& &/ &U~ &~ @ @- a A
aI aU e E eI EI eU EU
@@ -849,7 +849,7 @@ p p- ph q r R s t
t- tS tS; w


Dictionary fa_dict 2013-01-23
Dictionary fa_dict 2013-02-13

a A e i o u

@@ -859,7 +859,7 @@ r R s S t tS v w
x z Z


Dictionary an_dict 2013-01-24
Dictionary an_dict 2013-02-13

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

+ 28
- 5
dictsource/en_list View File

@@ -324,11 +324,14 @@ _#rd d
_#th T
_ord T // default ending
_1o f'3:
?5 _1o f'IR
_2o s'Ek
_3o T'3:
?5 _3o T'IR
_5o f'If
_20o tw'Enti@
_30o T'3:ti@
?3 _30o T'IRti@
_40o f'o@ti@
_50o f'Ifti@
_60o s'Iksti@
@@ -649,6 +652,7 @@ apparatus ap@r'eIt@s
apprentice a#prEnt2Is
approximate a#pr0ksIm@t $only
approximate a#pr0ksImeIt $verb
aqueduct akwI#dVkt
arab ar@b
arabic $1
arable ara#b@L
@@ -819,6 +823,7 @@ buffet bVfeI
bunion bVnI2@n
bureaucracy bjU@'0kr@si
bursar b3:s3
?5 bursar bVRs3
bus bVs
buses bVsI#z
busily bIzI2lI $verbf
@@ -976,6 +981,7 @@ cognac k0njak
coincide koUIns'aId
cojones k@hoUneIs
coliseum k0l@s'i:@m
collage k0l'A:Z
college k0lI2dZ
collegiate k@li:dZI@t
colloquial k@loUkwI@L
@@ -991,6 +997,7 @@ combo k0mboU
comely kVmlI // comeliness
comer kVm3
comet k0mI2t
commandant $alt1
commence k@mEns
commend k@mEnd
comment k0mEnt
@@ -1019,6 +1026,7 @@ conduct $1
conduct $verb
cone koUn
conical $1
confidant $alt1
conflict $1 $onlys
conflict $verb
conger k0Ng3
@@ -1140,6 +1148,7 @@ deny dI2naI
depot dEpoU
?3 depot di:poU
derange dI2reIndZ
descant dEskant
descry dI2skreI
desert dI2z3:t
desert dEs3t $only
@@ -1413,8 +1422,12 @@ gala gA:l@
galaxy gala#ksi
galileo galI2l'eIoU
galore $alt3
gallivant $alt1
?3 garage ga#rA:Z
garish ge@rIS
garote ga#r0t
garotte ga#r0t
garrot ga#r0t
gases gasI#z
gauche goUS
gauge geIdZ
@@ -2128,6 +2141,7 @@ predefine pri:dI2f'aIn
predicate prEdI2keIt
preface prEf@s
preferably prEf@-r@blI $verbf
prelate prEl@t
prelude prElju:d
?3 prelude preIlu:d
premier prEmI3
@@ -2185,8 +2199,8 @@ pud pUd // and pudding
punative pju:n@tIv
puny pju:ni
purist pju:r-Ist
purport p3:p'o@t
purportedly p3p'o@tI2dlI
purport $2
purportedly $2
pyjama p@dZA:m@
pyrites paIr'aIti:z
pythagoras paIT'ag@r@s
@@ -2363,6 +2377,7 @@ satanist seIt@nIst
saucepan sO:sp@n
saudi saUdi
saute sO:teI
?3 savant sa#vA:nt
says sEz
scaly skeIlI
salmon sam@n
@@ -2379,6 +2394,7 @@ sceptre sEpt3
sciatica saI'atIk@
sclera skli@r
scourge sk3:dZ
?5 scourge skVRdZ
scrotum skroUt@m
seabed si:bEd
sealion si:laI@n
@@ -2461,6 +2477,7 @@ snooker snu:k3
sofa soUf@
soiree swA:reI
sojourn soUdZ3:n
?5 sojourn soUdZVRn
solder s0ld3
?3 solder sA:d3
soldier soUldZ3
@@ -2512,6 +2529,7 @@ subsequent sVbsI2kw@nt
subside s@bsaId
subtly sVt@lI $verbf
suede sweId
suerte swe@rteI
suet su:I2t
suffice s@faIs
suffuse $2
@@ -2528,7 +2546,6 @@ supplier s@plaI3
suppose $2
suprise $2 // misspell
surest SU@@st
surplus s3:pl@s
surrogate sVr@geIt
?3 surrogate s3:@g@t
survey s3:veI $onlys
@@ -2598,6 +2615,7 @@ tho DoU $only
thousand TaUz@nd
throughout $2
thursday T3:zdeI
?5 thursday TVRzdeI
tidal taId@L
tidy taIdi
tierra tI'e@r@
@@ -2648,7 +2666,7 @@ truely tru:lI $verbf
truest tru:@st
tryst trIst
tudor tju:d3
turntable t3:nt2eIb@L
turntable $alt1
tulip tju:lIp
turnkey t3:nki:
?5 turnkey tVRnki:
@@ -2789,6 +2807,7 @@ without $2
wordprocessor $2
wordprocess $2
workshy w3:kSaI
?5 workshy wVRkSaI
workstation w'3:kst,eIS@n
?5 workstation w'VRkst,eIS@n
worktable $alt1
@@ -3013,6 +3032,7 @@ Lagos leIg0s
Leipzig laIpsIg
Leone li:'oUn
Lesotho l@s'u:tu:
Levant l@vant
Liberia laIb'i@ri:@
Lima li:ma#
Ljubljana lju:blj'A:n@
@@ -3124,6 +3144,7 @@ Tijuana ti@w'A:n@
Tikal tI2kA:l
Timor ti:mo@
Tokyo toUkIoU
Topeka toUp'i:k@
Toronto t@r0ntoU
Toulouse tu:l'u:z
?3 Tunisia tu:n'i:Z@
@@ -3198,6 +3219,7 @@ Baez baI'Ez
Bambi bambi:
Barack ba#rA:k
Barbara bA@b@r@
Bartholomew bA@T'0l@mju:
Benjamin bEndZ@mI#n
Benoit bEnw'A:
Bernard b3:n@d
@@ -3238,6 +3260,7 @@ Connor k0n3
Conrad $1
Crichton kraIt@n
Curtis k3:tI#s
?5 Curtis kVRtI#s
Dana deIn@
Daphne dafni
Darryl dar@L
@@ -3524,7 +3547,7 @@ Rameses ram@si:z
Ramirez ra#mi@3rEz
Reagan reIg@n
Reid ri:d
Remi r@ni:
Remi r@mi:
Reuter rOIt3
Rivera rI2ve@r@
Rizzoli rI2zoUli

+ 44
- 25
dictsource/en_rules View File

@@ -747,6 +747,7 @@
hum) an (_ @n
&) an (ty_ @n
&) an (t_ @n
&) an (t_$w_alt an
?8 &) an (t_ a#n
_f) an (at a#n
pl) an (t_ an
@@ -1713,7 +1714,6 @@
de (rog dI2
de (rACatio dE
_) des (@ dI2s
des (ca dE
des (ec dEs
des (eg d%i:s
dese (l d,i:sI2
@@ -1865,6 +1865,7 @@
ch) eese i:z
eeze (@ i:z
d) e (fault i:
_) e (ffac %I
e (ffec %I
e (ffic %I
efier (_ I2faI3
@@ -2490,7 +2491,8 @@
&ph) es (_S1 z
neri) es (_S2i z
&s) es (_S1 I#z
&us) es (_S2e I#z
us) es (_S2e I#z
lus) es (_S2 I#z
&rus) es (_S2 I#z
&tus) es (_S2 I#z
&ss) es (_S2 I#z
@@ -2668,6 +2670,9 @@
for (see f%O@
for (ward f'o@ // straightforward
ft (en f
&) ful (_S3 f@L
&) fully (_S5 f@li
&) fulness (_S7 f@Ln@s

.group g
g g
@@ -2704,9 +2709,11 @@
gh (an g
gm (_ m
gn (_ n
_poi) gn nj
_) gnu g@nu:
hun) g g
g (ear g
gei (st_ gaI
%A) g (er g
g (et g
g (ette_ dZ
@@ -2715,6 +2722,8 @@
er) g (et dZ
for) ge (t gE
bo) g (Ey g
_) gia (@@ dZa#
_) g (iant dZ
&) gia (_ dZ@
&) gia (C_ dZ@
go) g (ic_ g
@@ -3114,7 +3123,7 @@
l) im Im
_pr) im (a aIm
sh) im (a_ 'i:m
image ImI2dZ
imag (e ImI2dZ
l) ime aIm
d) ime (ns aImE
im (ent+ Im
@@ -3431,6 +3440,7 @@
c) is (_ Is
@@m) is (_ Is
am) is (_S1 z
v) is (_ Is
@Cs) is (_ =Is
&) is (abl aIz
isa (tion aIzeI
@@ -3983,6 +3993,7 @@
oi (c oUI2
oi (ce OI
oi (ck OI
oi (zA oUaI
c) o (inci %oU
o (ing oU
d) o (ing u:
@@ -4345,7 +4356,7 @@
pl) or o@
m) or (al 0r
w) or (K 3:
?5 w) or VR
?5 w) or (K VR
w) or (m 3:
?5 w) or (m VR
w) or (se 3:
@@ -4721,6 +4732,7 @@
_) pre (C@ pr%I
_) pre (C% prE
_) prea (ch pri:
_) pre (ad pr%i:
_) pre (am pri:
_) pre (cinc pri:
pre (cio prE
@@ -4728,7 +4740,7 @@
_) pre (coP3 pr,i:
preda (to prEd@
prede (ces pri:dI
_) pre (diP3 pr%i
_) pre (diP3 pr%i:
_) pre (dic pr%I
_) pre (em pr%i:
_) pre (fec pri:
@@ -5211,27 +5223,7 @@
_) tera tEr@
te (rrest t2@
r) tga (g gI
&) tia (_ S@
&s) tia (_ tS@
@) t (ia S
pi) t (ia t
is) t (ian+ t
&) tian (_ =S@n
_) tian tjan
&) tial S@L
&s) tial tj@L
&) ti (ali SI
i) tia (liL06 S@
&) tien S@n
&) tience S@ns
t (ime_ t2
&) tion S=@n
&s) tion tS@n
?8 &) tion S=Vn
?8 &s) tion tSVn
tion (al S=@-n
&) tious S=@s
AC) tive (_ =tIv
s) t (l ?
to (morr t@
_) to (nn tV
@@ -5254,6 +5246,7 @@
_) two tu:
ttu (r t@
@) tu (al tSu:
@) tu (at tSu:
_sta) tu tSu:
?3 _sta) tu (to tS@
c) tu (al_ =tSu:
@@ -5262,6 +5255,7 @@
@) tu (lat =tSU
?3 tu (Ant tSu:
?3 tu (Ancy tSu:

tu (ous tSu:
@) tur (A tS@r
@) tur (al_ tS=@r
@@ -5321,6 +5315,30 @@
_) them D%Em
_) the (mA Ti:

.group ti
&) tia (_ S@
&s) tia (_ tS@
propi) ti (a tI
ti (ac tI
&) tian (_ =S@n
&s) tian (_ tS@n
_) tian tjan
&) tial S@L
&s) tial tj@L
&) ti (ali SI
i) tia (liL06 S@
&) tien S@n
&) tience S@ns
ti (me_ t2aI
&) tion S=@n
&s) tion tS@n
?8 &) tion S=Vn
?8 &s) tion tSVn
tion (al S=@-n
&) tious S=@s
AC) tive (_ =tIv

.group u
u V
man) u ju:
@@ -5823,6 +5841,7 @@
_) z (wY z

@) zales (_ z'A:l@s
zei zaI
zes (_ zI2z
zh Z
zu (_ =zu:

+ 848
- 13
dictsource/fa_list
File diff suppressed because it is too large
View File


+ 34
- 17
dictsource/fa_rules View File

@@ -127,6 +127,8 @@
_) اصغر (آL09L09P4@ asq1aR
_) ابو (L04L09L09P3@ abu
_) ابو (آL09L09P3@ abu
_) ابوال (L04L09L09P5@ abol'
_) ابوال (آL09L09P5@ abol'

// Suffixes ا
L09L04) الله (_Sm4 ollAh
@@ -175,9 +177,6 @@
L09L04) انداز (_Sm5 andAz
L09L04) انگیز (_Sm5 angiz
L09L04) اباد (_Sm4 AbAd
L09L09) امیر (_Sm4 amiR
L09L09) اکبر (_Sm4 akbaR
L09L09) اصغر (_Sm4 asq1aR
// Special passive pronouns eg. خوابانده
l09l09l03) انده (_Sm4 Ande:
l09l09l03) اندۀ (_Sm4 Andeje
@@ -1150,8 +1149,8 @@
_) چار (آL09L09P3@ 'tSAR
_) چهار (L04L09L09P4@ 'tSAhAR
_) چهار (آL09L09P4@ 'tSAhAR
_) چند (L04L09L09P3@ 'tSAand
_) چند (آL09L09P3@ 'tSAand
_) چند (L04L09L09P3@ 'tSand
_) چند (آL09L09P3@ 'tSand

// Suffixes چ
L09L09L09) چی (_Sm2 tSi
@@ -1473,6 +1472,12 @@
_) خویش (آL09L09P4@ xiS
_) خان (L04L09L09P3@ xAn
_) خان (آL09L09P3@ xAn
_) خواهش (L04L09L09P5@ xAheS
_) خواهش (آL09L09P5@ xAheS
_) خواهد (L04L09L09P5@ xAhad
_) خواهد (آL09L09P5@ xAhad
_) خواهید (L04L09L09P6@ xAhid
_) خواهید (آL09L09P6@ xAhid

// suffixes خ
L09L09) خر (_Sm2 xaR
@@ -1488,6 +1493,7 @@
L09L09) خوش (_Sm3 xoS
L09L09) خیز (_Sm3 xiz
L09L09) خواست (_Sm5 xAst
L09L09) خواب (_Sm4 xAb

// arabic form of words (Babs) خ
//فواعل eg. جوامع
@@ -1663,6 +1669,7 @@
L09L09) دست (_Sm3 dast
L09L09) درد (_Sm3 daRd
L09L09) دوش (_Sm3 duS
L09L09) دهی (_Sm3 dehi

// arabic form of words (Babs) د
//فواعل eg. جوامع
@@ -2154,6 +2161,7 @@
L09L09) زده (_+Sm3 zade:
L09L09) زدۀ (_+Sm3 zadeje
L09L09) زدن (_Sm3 zadan
L09L09) زدا (_Sm3 zodA

// arabic form of words (Babs) ز
//فواعل eg. جوامع
@@ -2816,8 +2824,8 @@
L09L09L09L09) ص (L03L09L09L09_ sa

// Prefixes ص
_) صاحب (L04L09L09P4@ saheb
_) صاحب (آL09L09P4@ saheb
_) صاحب (L04L09L09P4@ sAheb
_) صاحب (آL09L09P4@ sAheb
_) صدر (L04L09L09P5@ sadr
_) صدر (آL09L09P5@ sadr

@@ -3132,6 +3140,7 @@
// Suffixes ط
L09L09) طلب (_Sm3 talab
L09L09) طلبان (_Sm5 talabAn

// arabic form of words (Babs) ط
//فواعل eg. جوامع
@@ -3433,7 +3442,8 @@
// Prefixes ع
_) عبد (L04L09L09P3@ 'a:bd
_) عبد (آL09L09P3@ 'a:bd

_) عبدال (L04L09L09P5@ abdol'
_) عبدال (آL09L09P5@ abdol'
_) علی (L04L09L09P3@ a:li
_) علی (آL09L09P3@ a:li

@@ -4081,6 +4091,7 @@
L09L09) کنان (_Sm4 konAn
L09L09) کننده (_Sm5 konande:
L09L09) کنندۀ (_Sm5 konandeje
L09L09) کنندگان (_Sm7 konandegAn
L09L09) کوچک (_Sm4 kutSak

// arabic form of words (Babs) ک
@@ -4285,6 +4296,7 @@
L09L09) گرفت (_Sm4 geReft
L09L09) گشا (_Sm3 goSA
L09L09) گریز (_Sm4 goRiz
L09L09) گسار (_Sm4 gosAR

// arabic form of words (Babs) گ
//فواعل eg. جوامع
@@ -4444,8 +4456,8 @@
// Prefixes ل
// Suffixes ل
L09L09) لوژ (_Sm3 lotZ
L09L09) لوژیک (_Sm5 lotZik
L09L09) لوژ (_Sm3 loZ
L09L09) لوژیک (_Sm5 loZik
L09L09) لوگ (_Sm3 log

// arabic form of words (Babs) ل
@@ -4863,6 +4875,8 @@
L09L09L03) ند (_NSm2 and
L09L09) نوشت (_Sm4 neveSt
L09L09) نشین (_Sm4 neSin
L09L09) نکردن (_Sm5 nakaRdan
L09L09L09) نشدن (_Sm4 naSodan

// arabic form of words (Babs) ن
//فواعل eg. جوامع
@@ -5189,9 +5203,8 @@
_) هم (آL09P2@ ham

// suffixes ه
L09L03) ه (_++NSm1 e:
L09L01و) ه (_++NSm1 e:
L09) هٔ (_Sm2 eje
L09L03) ه (_++Sm1 e:
L09L01و) ه (_++Sm1 e:
L09L09) ها (_NSm2 hA
// Plural pronoun ها
L09L09) های (_NSm3 h'Aje
@@ -5286,7 +5299,7 @@
// Suffixes یی
L09L01) یی (_Sm2 i:
L09L03) یی (_Sm2 ii
L09L03) یی (_Sm1 i
L09L01) ییم (_NSm3 i:m
L09L03) ییم (_NSm3 iim
L09L09L01) یید (_NSm3 i:d
@@ -5322,7 +5335,7 @@
L09و) ی (L01 j
L09ا) ی (L03 j
L09ا) ی (L01 j
L03) ی (وL03 j
L03) ی (وL03 ij
//otherwise
L02) ی (_ j
_ع) ی (L03_ j
@@ -5361,7 +5374,6 @@
L09L01) ی (_Sm1 j
L09L09آ) ی (_Sm1 je
L09L09ا) ی (_NSm1 je
L09L09ی) ی (_Sm1 je
L09L01و) ی (_Sm1 i
L09L03و) ی (_Sm1 je
L09L01) یند (_Sm3 jand
@@ -5496,6 +5508,11 @@

.group ء
ء ?
// suffixes ء
L09L09L04) ء (_Sm1 ?
L09L09ا) ء (_Sm1
L09L09آ) ء (_Sm1


//this character "ٔ" is defrent of "ء" and "ۀ" for example "دانشنامهٔ "

@@ -5504,7 +5521,7 @@
ٔ

// suffixes ٔ
L09L09) ٔ (_Sm1
L09L03) ٔ (_NSm1 je


.group ّ

+ 2
- 1
dictsource/pt_list View File

@@ -661,9 +661,11 @@ algozes $alt
alicerce $alt
amanheça $alt2
amanheço $alt2
amanhecesse $alt2
amarelo $alt
ameba $alt
amores $alt2
anoitecesse $alt2
anoiteça $alt2
anoiteço $alt2
apego $alt2 $noun
@@ -1011,7 +1013,6 @@ rocha $alt
rock $alt
rogas $alt
rolo $alt2 $noun
rosna $alt
rumores $alt2
saleta $alt2
sarjeta $alt

+ 102
- 89
dictsource/pt_rules View File

@@ -21,7 +21,7 @@
.L04 a am e em o ue uem
.L05 r ra ram re rem rdes
.L06 ra ram ste re rem
.L07 se sem te
.L07 sse ssem ste


.group a
@@ -345,100 +345,110 @@
sf) e (ra_ E // esfera, biosfera
//sort
qu) e (brL04_ E
_hosp) e (dL03_ E
_estr) ei (L03_ EI
_inv) e (jL04_ E
_dec) e (pL04_ E
_g) e (rL04_ E
_op) e (rL04_ E
_qu) e (rL04_ E
_alt) e (rL04_ E
_inv) e (rtL03_ e
_f) e (rvL03_ e
_p) e (scL03_ E
_m) e (sclL04_ E
_m) e (tL03_ e
_com) e (tL03_ e
_rem) e (tL03_ e
_derr) e (tL03_ e
_prom) e (tL03_ e
_subm) e (tL03_ e
_fiz) e (L05_ E
_exag) e (L05_ E
_houv) e (L05_ E
_perd) e (L05_ e
_soub) e (L05_ E
_rend) e (L06_ e
_vend) e (L06_ e
_atend) e (L06_ e
_compreend) e (L06_ e
_entend) e (L06_ e
_estend) e (L06_ e
respond) e (L06_ e // cor-
com) e (L07_ e
_bat) e (L07_ e
_beb) e (L07_ e
_tem) e (L07_ e
_viv) e (L07_ e
colh) e (L07_ e // & es-
_corr) e (L07_ e
_eleg) e (L07_ e
_morr) e (L07_ e
_perd) e (L07_ e
_sofr) e (L07_ e
_torc) e (L07_ e
_venc) e (L07_ e
_adoec) e (L07_ e
_aperd) e (L07_ e
_merec) e (L07_ e
conhec) e (L07_ e // & re-
entend) e (L07_ e
preend) e (L07_ e // sur- com-
respond) e (L07_ e // cor-
_convenc) e (L07_ e
_entristec) e (L07_ e
_envaidec) e (L07_ e
_escond) e (L07_ e
_obedec) e (L07_ e
interromp) e (L07_ e
intromet) e (L07_ e
qu) e (brL04_ E
_hosp) e (dL03_ E
_estr) ei (L03_ EI
_inv) e (jL04_ E
_dec) e (pL04_ E
_p) e (quL02_ E
_s) e (quL02_ E
l) e (que_ E
_imp) e (rL03_ E
_reit) e (rL03_ E
_g) e (rL04_ E
_op) e (rL04_ E
_qu) e (rL04_ E
_alt) e (rL04_ E
_sup) e (rL04_ E
_tol) e (rL04_ E
_coop) e (rL04_ E
_temp) e (rL04_ E
_) e (rguL02_ E
_alb) e (rguL02_ E
_enx) e (rguL02_ E
_inv) e (rtL03_ e
_f) e (rvL03_ e
_p) e (scL03_ E
_m) e (sclL04 E
_l) e (ssL02_ e
_esp) e (ssL03_ e
_m) e (tL03_ e
_com) e (tL03_ e
_rem) e (tL03_ e
_derr) e (tL03_ e
_prom) e (tL03_ e
_subm) e (tL03_ e
_comprom) e (tL03_ e
_sol) e (trL03_ E
_atr) e (vL03_ e
scr) e (vL03_ e // e- in- pre- ree-
_descr) e (vL03_ e
_embel) e (zL04_ E
_pr) e (zL04_ E
_acont) e (çL01_ e
_ado) e (çL03_ e
_aqu) e (çL03_ e
_car) e (çL03_ e
_mer) e (çL03_ e
_pad) e (çL03_ e
_per) e (çL03_ e
_esqu) e (çL03_ e
_obed) e (çL03_ e
_ofer) e (çL03_ e
_aborr) e (çL03_ e
_sol) e (trL03_ E
_pen) e (trL04_ E
scr) e (vL03_ e // e- in- pre- ree-
_atr) e (vL03_ e
_descr) e (vL03_ e
_pr) e (zL04_ E
_embel) e (zL04_ E
par) e (çL01_ e // pareça, apareça
_acont) e (çL01_ e
_arref) e (çL01_ e
_ado) e (çL03_ e
_aqu) e (çL03_ e
_car) e (çL03_ e
_mer) e (çL03_ e
_pad) e (çL03_ e
_per) e (çL03_ e
_esqu) e (çL03_ e
_obed) e (çL03_ e
_ofer) e (çL03_ e
_aborr) e (çL03_ e
_compar) e (çL03_ e
_desapar) e (çL03_ e
_enfraqu) e (çL03_ e
_enriqu) e (çL03_ e
_envaid) e (çL03_ e
_esclar) e (çL03_ e
_esclar) e (çL03_ e
_reapar) e (çL03_ e
_reconh) e (çL03_ e
_coop) e (rL04_ E
_sup) e (rL04_ E
_imp) e (rL03_ E
_temp) e (rL04_ E
_tol) e (rL04_ E
_esp) e (ssL03_ e
_l) e (ssL02_ e
_perd) e (L05_ e
_rend) e (L06_ e
_atend) e (L06_ e
_pen) e (trL04_ E
_reit) e (rL03_ E
par) e (çL01_ e // pareça, apareça
_arref) e (çL01_ e
_beb) e (ssL02_ e
com) e (ssL02_ e
_corr) e (ssL02_ e
_morr) e (sL07_ e
_adoec) e (sL07_ e
_torc) e (sL07_ e
_viv) e (sL07_ e
_eleg) e (sL07_ e
respond) e (sL07_ e // & corres-
entend) e (sL07_ e
compreend) e (sL07_ e
interromp) e (sL07_ e
intromet) e (sL07_ e
_escond) e (sL07_ e
_bat) e (sL07_ e
_sofr) e (sL07_ e
l) e (que_ E
_p) e (quL02_ E
_s) e (quL02_ E
_) e (rguL02_ E
_enx) e (rguL02_ E
_alb) e (rguL02_ E
//endsort

_exag) e (L05_ E
_fiz) e (L05_ E
_houv) e (L05_ E
_soub) e (L05_ E

_compreend) e (L06_ e
_correspond) e (L06_ e
_entend) e (L06_ e
_estend) e (L06_ e
_respond)e (L06_ e
_vend) e (L06_ e

.group é
é ''E
@@ -727,22 +737,25 @@ _escond) e (sL07_ e

//sort
_engl) o (bL01_ O
_esn) o (bL04_ O
_deb) o (chL04_ O
_desabr) o (chL04_ O
_r) o (gL04_ O
_adv) o (gL04_ O
_ref) o (gL04_ O
_ap) oi (L01_ OI
_esc) o (lhL02_ O
_m) o (lhL04_ O
_abs) o (lvL02_ O
_env) o (lvL02_ O
c) o (rrL01_ o // escorra, incorra, corra, recorra
_m) o (rrL01_ o
p) ostos (_ Ost=Us# // dispostos etc.
_esn) o (bL04_ O
_esc) o (lhL02_ O
_rev) o (lvL02_ O
_desenv) o (lvL02_ O
_ent) o (pL02_ O
c) o (rrL01_ o // escorra, incorra, corra, recorra
_m) o (rrL01_ o
_r) o (snL01_ O
_c) o (spL02_ O
p) ostos (_ Ost=Us# // dispostos etc.
//endsort

.group ô

+ 11
- 10
phsource/compile_report View File

@@ -1,3 +1,4 @@

86 phoneme tables
new total
base 109 109
@@ -6,7 +7,7 @@ consonants 10 118
en 54 156
en-n 33 156
en-us 40 157
en-sc 40 158
en-sc 41 158
en-rp 34 156
en-wm 31 156
en-wi 30 156
@@ -420,7 +421,7 @@ l/l_ [l] base
[l/] fr
l/l_@ [l/3] base
[l/] fr
l/l@ [] base
l/l@ [hFp] base
[l#] base
[l] fr
[l/2] fr
@@ -454,7 +455,7 @@ l/L2_oL [l/2] base
l/L2_uL [l/2] base
l/l_3 [l/] de
l/l_4 [ll] sq
l/la [] base
l/la [hFp] base
[l#] base
[l] fr
[l/2] fr
@@ -462,7 +463,7 @@ l/la [] base
[K] tn
l/l_a [l/3] base
[l/] fr
l/le [] base
l/le [hFp] base
[l#] base
[l] fr
[l/2] fr
@@ -474,7 +475,7 @@ l/L_eL_af [&] af
[&:] af
l/l_front [L] sq
l/l_front_ [l/4] sq
l/li [] base
l/li [hFp] base
[l#] base
[l] fr
[l/2] fr
@@ -488,7 +489,7 @@ ll/ll [L] base
ll/_ll [L] base
l/l_long [l] base
[l] fr
l/lo [] base
l/lo [hFp] base
[l#] base
[l/2] fr
[K] nso
@@ -499,7 +500,7 @@ l^/l_rfx [l.] base
[l;] lt
[l] ru
[l^] ru
l/lu [] base
l/lu [hFp] base
[l#] base
[l] fr
[l/2] fr
@@ -1039,8 +1040,7 @@ vdiph/0i_2 [OI] en-sc
[OI] en-wi
[AI] no
vdiph2/8@ [U@] en
vdiph2/e@ [3:] en-sc
[e@] en-sc
vdiph2/e@ [e@] en-sc
[e@] en-wi
vdiph2/ea [eA] lt
[ea] ro
@@ -2224,9 +2224,10 @@ vowel/oo_en [O] en
[O] en-rp
vowelr/aa_r [A:] en-sc
[A@] en-sc
vowelr/e_r [3:] en-sc
vowelr/i_r [i@3] en-sc
vowelr/oo_r [O@] en-sc
vowelr/o_r [o@] en-sc
[o@] en-sc
vowelr/r-voc [r-] base
[r-] sk
[r:] sk

+ 8
- 5
phsource/ph_english_sc View File

@@ -113,6 +113,10 @@ phoneme I2
CALL I
endphoneme

phoneme I#
vowel starttype #@ endtype #@
ChangePhoneme(I2)
endphoneme

phoneme i // optional variant of [I] for end of words
vowel starttype #i endtype #e
@@ -171,11 +175,10 @@ endphoneme

phoneme 3:
vowel starttype #e endtype #@
length 210
length 230
ChangeIfNotStressed(VR) // also need "replace 02 3: VR" in voice file
ipa e
AppendPhoneme(r)
FMT(vdiph2/e@)
FMT(vowelr/e_r)
endphoneme


@@ -217,7 +220,7 @@ phoneme o@
length 230
ipa o
AppendPhoneme(r)
FMT(vowelr/o_r)
FMT(vowelr/oo_r)
endphoneme


@@ -310,7 +313,7 @@ endphoneme
phoneme i@3
vowel starttype #i endtype #@
ipa ɪ
length 220
length 240
AppendPhoneme(r)
FMT(vowelr/i_r)
endphoneme

BIN
phsource/vowelr/e_r View File


BIN
phsource/vwl_en_us/ar View File


+ 44
- 19
src/compiledata.cpp View File

@@ -630,6 +630,7 @@ static FILE *f_phtab;
static FILE *f_phcontents;
static FILE *f_errors = stderr;
static FILE *f_prog_log = NULL;
static FILE *f_report;


static FILE *f_in;
@@ -642,6 +643,7 @@ static int count_references = 0;
static int duplicate_references = 0;
static int count_frames = 0;
static int error_count = 0;
static int resample_count = 0;
static int then_count = 0;
static int after_if = 0;

@@ -733,27 +735,21 @@ static void CompileReport(void)
int n;
REF_HASH_TAB *p;
REF_HASH_TAB **list;
FILE *f_report;
const char *data_path;
int prev_table;
int prev_mnemonic;
char fname[sizeof(path_source)+20];

if(f_report == NULL)
return;

// make a list of all the references and sort it
list = (REF_HASH_TAB **)malloc((count_references)* sizeof(REF_HASH_TAB *));
if(list == NULL)
return;

sprintf(fname,"%scompile_report",path_source);
f_report = fopen(fname,"w");
if(f_report == NULL)
{
free(list);
return;
}

fprintf(f_report,"%d phoneme tables\n",n_phoneme_tabs);
fprintf(f_report," new total\n");
fprintf(f_report,"\n%d phoneme tables\n",n_phoneme_tabs);
fprintf(f_report," new total\n");
for(ix=0; ix<n_phoneme_tabs; ix++)
{
fprintf(f_report,"%8s %3d %4d\n",phoneme_tab_list2[ix].name, phoneme_tab_list2[ix].n_phonemes, n_phcodes_list[ix]+1);
@@ -1824,20 +1820,31 @@ static int LoadWavefile(FILE *f, const char *fname)
if((fd_temp = mkstemp(fname_temp)) >= 0)
{
close(fd_temp);
sprintf(command,"sox \"%s%s.wav\" -r %d -c 1 -w %s polyphase\n",path_source,fname,samplerate_native,fname_temp);
sprintf(command,"sox \"%s%s.wav\" -c1 -t wav %s rate -h %d\n",path_source,fname,fname_temp,samplerate_native);
if(system(command) < 0)
{
error("Failed to resample: %s",command);
remove(fname_temp);
return(0);
}
}

if(GetFileLength(fname_temp) <= 0)
{
error("Failed to resample: %s",command);
remove(fname_temp);
return(0);
}

f = fopen(fname_temp,"rb");
if(f == NULL)
{
error("Can't read temp file: %s",fname_temp);
return(0);
}
if(f_report != NULL)
fprintf(f_report, "resampled %s\n", fname);
resample_count++;
resample_wav = 1;
fseek(f,40,SEEK_SET); // skip past the WAV header, up to before "data length"
}
@@ -3408,9 +3415,13 @@ static void CompilePhonemeData2(const char *source)
wxString report;
wxString report_dict;

#ifdef MAKE_ENVELOPES
make_envs();
#endif

n_envelopes = 0;
error_count = 0;
memset(markers_used,0,sizeof(markers_used));
memset(markers_used,0,sizeof(markers_used));

f_errors = stderr;

@@ -3471,6 +3482,10 @@ static void CompilePhonemeData2(const char *source)
if((f_errors = fopen_log(f_errors,fname,"w")) == NULL)
f_errors = stderr;

sprintf(fname,"%s%s",path_source,"compile_report");
f_report = fopen_log(f_errors, fname,"w");


sprintf(fname,"%s/%s",path_home,"phondata-manifest");
if((f_phcontents = fopen_log(f_phcontents,fname,"w")) == NULL)
f_phcontents = stderr;
@@ -3534,8 +3549,6 @@ static void CompilePhonemeData2(const char *source)
fprintf(f_errors,"\nRefs %d, Reused %d\n",count_references,duplicate_references);
fclose(f_in);
fclose(f_phdata);
if(f_errors != stderr)
fclose(f_errors);
if(f_prog_log != NULL)
fclose(f_prog_log);
fclose(f_phindex);
@@ -3545,18 +3558,30 @@ fprintf(f_errors,"\nRefs %d, Reused %d\n",count_references,duplicate_references
LoadPhData();
LoadVoice(voice_name2,0);


CompileReport();
report_dict = CompileAllDictionaries();
//#ifdef deleted
DrawEnvelopes();
//#endif

if(gui_flag)
{
delete progress;
}

report.Printf(_T("Compiled phonemes: %d errors."),error_count);
if(resample_count > 0)
{
fprintf(f_errors, "\n%d WAV files resampled to %d Hz\n", resample_count, samplerate_native);
report.Printf(_T("Compiled phonemes: %d errors, %d files resampled to %d Hz. "),error_count, resample_count, samplerate_native);
}
else
{
report.Printf(_T("Compiled phonemes: %d errors."),error_count);
}

if(f_errors != stderr)
fclose(f_errors);

if(error_count > 0)
{
report += _T(" See file: 'phsource/error_log'.");
@@ -3734,6 +3759,7 @@ void CompileIntonation()
char buf[sizeof(path_source)+120];

error_count = 0;
resample_count = 0;

sprintf(fname_errors,"%s%s",path_source,"error_intonation");
if((f_errors = fopen(fname_errors,"w")) == NULL)
@@ -4002,7 +4028,6 @@ void CompileIntonation()
fwrite(tune_data, n_tune_names, sizeof(TUNE), f_out);
fclose(f_in);
fclose(f_out);
fclose(f_errors);

report.Printf(_T("Compiled %d intonation tunes: %d errors."),n_tune_names, error_count);
wxLogStatus(report);

+ 6
- 2
src/compiledict.cpp View File

@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2005 to 2010 by Jonathan Duddington *
* Copyright (C) 2005 to 2013 by Jonathan Duddington *
* email: [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -51,11 +51,15 @@ static char letterGroupsDefined[N_LETTER_GROUPS];

MNEM_TAB mnem_rules[] = {
{"unpr", 0x01},
{"w_alt1", 0x11},
{"w_alt2", 0x12},
{"w_alt3", 0x13},
// {"w_alt4", 0x14},
{"w_alt", 0x11}, // note: put longer names before their sub-strings
{"p_alt1", 0x21},
{"p_alt2", 0x22},
{"p_alt3", 0x23},
// {"p_alt4", 0x24},
{"p_alt", 0x21},
{NULL, -1} };

@@ -1586,7 +1590,7 @@ static int compile_lettergroup(char *input, FILE *f_out)
items[n_items] = p_start = p;
while((*p & 0xff) > ' ')
{
if (*p == '_') *p = ' '; // allow '_' for word break
if (*p == '_') *p = ' '; // allow '_' for word break
p++;
}
*p++ = 0;

+ 10
- 0
src/dictionary.cpp View File

@@ -296,6 +296,10 @@ int LoadDictionary(Translator *tr, const char *name, int no_error)

// set up indices into data_dictrules
InitGroups(tr);
if(tr->groups1[0] == NULL)
{
fprintf(stderr,"Error in %s_rules, no default rule group\n",name);
}

// set up hash table for data_dictlist
p = &(tr->data_dictlist[8]);
@@ -2732,6 +2736,12 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
if(word_flags & FLAG_UNPRON_TEST)
return(match1.end_type | 1);

#ifdef deleted
// ?? allow $unpr while translating rules, not just on initial FLAG_UNPRON_TEST
if((match1.end_type & SUFX_UNPRON) && !(word_flags & FLAG_SUFFIX_REMOVED))
return(match1.end_type);
#endif

if((match1.phonemes[0] == phonSWITCH) && ((word_flags & FLAG_DONT_SWITCH_TRANSLATOR)==0))
{
// an instruction to switch language, return immediately so we can re-translate

+ 6
- 2
src/espeak.cpp View File

@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2006 to 2007 by Jonathan Duddington *
* Copyright (C) 2006 to 2013 by Jonathan Duddington *
* email: [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -768,7 +768,11 @@ int main (int argc, char **argv)
fclose(f_text);
}

espeak_Synchronize();
if(espeak_Synchronize() != EE_OK)
{
fprintf(stderr, "espeak_Synchronize() failed, maybe error when opening output device\n");
exit(4);
}

if(f_phonemes_out != stdout)
fclose(f_phonemes_out); // needed for WinCE

+ 2
- 2
src/espeakedit.cpp View File

@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2005 to 2010 by Jonathan Duddington *
* Copyright (C) 2005 to 2013 by Jonathan Duddington *
* email: [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -685,7 +685,7 @@ void DisplayErrorFile(const char *fname)
if(len > 0)
{
if(len > 1500)
len = 1500; // restrict length to pppppevent crash in wxLogMessage()
len = 1500; // restrict length to prevent crash in wxLogMessage()
msg = (char *)malloc(len+1);
if(msg != NULL)
{

+ 3
- 3
src/prosodydisplay.cpp View File

@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2005 to 2007 by Jonathan Duddington *
* Copyright (C) 2005 to 2013 by Jonathan Duddington *
* email: [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -162,8 +162,8 @@ void ProsodyDisplay::SelectPh(int index)
}
y1 = p->pitch1;
y2 = p->pitch2;
sprintf(buf,"Stress %s%d Amp %2d LenMod %2d Pitch %3d %3d %s PhFlags %.2x ",
emphasized,p->stresslevel&0x7,p->amp,p->length,y1,y2,name,p->ph->phflags);
sprintf(buf,"Stress %s%d Amp %2d StdLength %2d LengthMod %2d Pitch %3d %3d %s PhFlags %.2x ",
emphasized,p->stresslevel&0x7,p->amp,p->std_length*2, p->length,y1,y2,name,p->ph->phflags);
wxLogStatus(wxString(buf,wxConvLocal));
}


+ 17
- 6
src/speak_lib.cpp View File

@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2005 to 2011 by Jonathan Duddington *
* Copyright (C) 2005 to 2013 by Jonathan Duddington *
* email: [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -60,6 +60,7 @@ static espeak_AUDIO_OUTPUT my_mode=AUDIO_OUTPUT_SYNCHRONOUS;
static int synchronous_mode = 1;
static int out_samplerate = 0;
static int voice_samplerate = 22050;
static espeak_ERROR err = EE_OK;

t_espeak_callback* synth_callback = NULL;
int (* uri_callback)(int, const char *, const char *) = NULL;
@@ -114,7 +115,11 @@ static int dispatch_audio(short* outbuf, int length, espeak_EVENT* event)
sleep(1);
}
out_samplerate = voice_samplerate;
wave_init(voice_samplerate);
if(!wave_init(voice_samplerate))
{
err = EE_INTERNAL_ERROR;
return(-1);
}
wave_set_callback_is_output_enabled( fifo_is_command_enabled);
my_audio = wave_open("alsa");
event_init();
@@ -166,8 +171,8 @@ static int dispatch_audio(short* outbuf, int length, espeak_EVENT* event)
}

SHOW_TIME("LEAVE dispatch_audio\n");
return (a_wave_can_be_played==0); // 1 = stop synthesis
return (a_wave_can_be_played==0); // 1 = stop synthesis, -1 = error
}


@@ -373,6 +378,7 @@ static int initialise(int control)
int param;
int result;

err = EE_OK;
LoadConfig();
WavegenInit(22050,0); // 22050
if((result = LoadPhData()) != 1)
@@ -487,6 +493,8 @@ static espeak_ERROR Synthesize(unsigned int unique_identifier, const void *text,
{
#ifdef USE_ASYNC
finished = create_events((short *)outbuf, length, event_list, a_write_pos);
if(finished < 0)
return EE_INTERNAL_ERROR;
length = 0; // the wave data are played once.
#endif
}
@@ -516,7 +524,8 @@ static espeak_ERROR Synthesize(unsigned int unique_identifier, const void *text,
#ifdef USE_ASYNC
if (my_mode==AUDIO_OUTPUT_PLAYBACK)
{
dispatch_audio(NULL, 0, NULL); // TBD: test case
if(dispatch_audio(NULL, 0, NULL) < 0) // TBD: test case
return err = EE_INTERNAL_ERROR;
}
else
{
@@ -1198,6 +1207,7 @@ ESPEAK_API int espeak_IsPlaying(void)

ESPEAK_API espeak_ERROR espeak_Synchronize(void)
{//=============================================
espeak_ERROR berr = err;
#ifdef USE_ASYNC
SHOW_TIME("espeak_Synchronize > ENTER");
while (espeak_IsPlaying())
@@ -1205,8 +1215,9 @@ ESPEAK_API espeak_ERROR espeak_Synchronize(void)
usleep(20000);
}
#endif
err = EE_OK;
SHOW_TIME("espeak_Synchronize > LEAVE");
return EE_OK;
return berr;
} // end of espeak_Synchronize



+ 2
- 1
src/synthdata.cpp View File

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

const char *version_string = "1.46.34 12.Feb.13";
const char *version_string = "1.46.35 14.Feb.13";
const int version_phdata = 0x014631;

int option_device_number = -1;
@@ -1215,6 +1215,7 @@ void InterpretPhoneme(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_
memcpy(&worddata->prev_vowel, &plist[0], sizeof(PHONEME_LIST));
}

plist->std_length = phdata->pd_param[i_SET_LENGTH];
} // end of InterpretPhoneme



+ 1
- 0
src/synthesize.h View File

@@ -220,6 +220,7 @@ typedef struct {
unsigned char newword; // bit 0=start of word, bit 1=end of clause, bit 2=start of sentence
unsigned char pitch1;
unsigned char pitch2;
unsigned char std_length;
} PHONEME_LIST;



+ 12
- 1
src/translate.cpp View File

@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2005 to 2011 by Jonathan Duddington *
* Copyright (C) 2005 to 2013 by Jonathan Duddington *
* email: [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -1135,6 +1135,17 @@ if((wmark > 0) && (wmark < 8))
return(0);
}

#ifdef deleted
// ?? allow $unpr while translating rules, not just on initial FLAG_UNPRON_TEST
if(end_type & SUFX_UNPRON)
{
phonemes[0] = 0; // discard and retranslate as individual letters
SpeakIndividualLetters(tr, wordx, phonemes, 0);
strcpy(word_phonemes, phonemes);
return(0);
}
#endif

if((phonemes[0] == 0) && (end_phonemes[0] == 0))
{
int wc;

+ 1
- 1
src/translate.h View File

@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2005 to 2011 by Jonathan Duddington *
* Copyright (C) 2005 to 2013 by Jonathan Duddington *
* email: [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *

+ 8
- 7
src/wave.cpp View File

@@ -62,7 +62,7 @@ enum {ONE_BILLION=1000000000};
static int pulse_running;

// wave.cpp (this file)
void wave_port_init(int);
int wave_port_init(int);
void* wave_port_open(const char* the_api);
size_t wave_port_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize);
int wave_port_close(void* theHandler);
@@ -77,7 +77,7 @@ int wave_port_get_remaining_time(uint32_t sample, uint32_t* time);

// wave_pulse.cpp
int is_pulse_running();
void wave_pulse_init(int);
int wave_pulse_init(int);
void* wave_pulse_open(const char* the_api);
size_t wave_pulse_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize);
int wave_pulse_close(void* theHandler);
@@ -91,13 +91,13 @@ void* wave_pulse_test_get_write_buffer();
int wave_pulse_get_remaining_time(uint32_t sample, uint32_t* time);

// wrappers
void wave_init(int srate) {
int wave_init(int srate) {
pulse_running = is_pulse_running();

if (pulse_running)
wave_pulse_init(srate);
return wave_pulse_init(srate);
else
wave_port_init(srate);
return wave_port_init(srate);
}

void* wave_open(const char* the_api) {
@@ -756,7 +756,7 @@ void wave_set_callback_is_output_enabled(t_wave_callback* cb)
//<wave_init

// TBD: the arg could be "alsa", "oss",...
void wave_init(int srate)
int wave_init(int srate)
{
ENTER("wave_init");
PaError err;
@@ -773,6 +773,7 @@ void wave_init(int srate)
{
SHOW_TIME("wave_init > Failed to initialise the PortAudio sound");
}
return err == paNoError;
}

//>
@@ -1194,7 +1195,7 @@ void *wave_test_get_write_buffer()
// notdef USE_PORTAUDIO


void wave_init(int srate) {}
int wave_init(int srate) {}
void* wave_open(const char* the_api) {return (void *)1;}
size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;}
int wave_close(void* theHandler) {return 0;}

+ 1
- 1
src/wave.h View File

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

extern int option_device_number;

extern void wave_init(int samplerate);
extern int wave_init(int samplerate);
// TBD: the arg could be "alsa", "oss",...
extern void* wave_open(const char* the_api);


+ 3
- 3
src/wave_pulse.cpp View File

@@ -660,14 +660,14 @@ void wave_set_callback_is_output_enabled(t_wave_callback* cb)
//>
//<wave_init

void wave_init(int srate)
int wave_init(int srate)
{
ENTER("wave_init");

stream = NULL;
wave_samplerate = srate;

pulse_open();
return pulse_open() == PULSE_OK;
}

//>
@@ -870,7 +870,7 @@ void *wave_test_get_write_buffer()
// notdef USE_PULSEAUDIO


void wave_init() {}
int wave_init() {}
void* wave_open(const char* the_api) {return (void *)1;}
size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;}
int wave_close(void* theHandler) {return 0;}

+ 4
- 3
src/wave_sada.cpp View File

@@ -78,7 +78,7 @@ static uint32_t wave_samplerate;
//
//<wave_init

void wave_init(int srate) {
int wave_init(int srate) {
ENTER("wave_init");

audio_info_t ainfo;
@@ -104,7 +104,7 @@ void wave_init(int srate) {
SHOW("wave_init() sun_audio_fd: %d\n", sun_audio_fd);

if (sun_audio_fd < 0) {
return;
return(0);
}

ioctl(sun_audio_fd, AUDIO_GETINFO, &ainfo);
@@ -117,8 +117,9 @@ void wave_init(int srate) {
if (ioctl(sun_audio_fd, AUDIO_SETINFO, &ainfo) == -1) {
SHOW("wave_init() failed to set audio params: %s\n", strerror(errno));
close(sun_audio_fd);
return;
return(0);
}
return(1);
}

//>

Loading…
Cancel
Save