| conches k0ntSI#z | conches k0ntSI#z | ||||
| concierge k0nsI'e@Z | concierge k0nsI'e@Z | ||||
| concise k0#ns'aIs | concise k0#ns'aIs | ||||
| conclave $1 | |||||
| conduct $1 | conduct $1 | ||||
| conduct $verb | conduct $verb | ||||
| cone koUn | cone koUn | ||||
| deliberate dI2lIb@r@t | deliberate dI2lIb@r@t | ||||
| delicate dElI2k@t | delicate dElI2k@t | ||||
| delimit dI2lImIt // delimited | delimit dI2lImIt // delimited | ||||
| delivery $alt2 | |||||
| demolish dI2m0lIS | demolish dI2m0lIS | ||||
| demon di:m@n | demon di:m@n | ||||
| demoness di:m@nEs | demoness di:m@nEs |
| di (ox d%aI | di (ox d%aI | ||||
| _) di (s@ dI2 | _) di (s@ dI2 | ||||
| _) di (sa@ ,dI | _) di (sa@ ,dI | ||||
| _) di (sarm dI2 | |||||
| _) disa (p ,dIs@ | _) disa (p ,dIs@ | ||||
| di (sast dI2 | di (sast dI2 | ||||
| di (sbe@ ,dI | di (sbe@ ,dI | ||||
| er (ve 3: | er (ve 3: | ||||
| s) er (van 3: | s) er (van 3: | ||||
| ery (_ @r%i | ery (_ @r%i | ||||
| ?3 ery (_++$w_alt2 @rI | |||||
| ?3 @@AC) ery (_ e@ri | ?3 @@AC) ery (_ e@ri | ||||
| ery (A 3j | ery (A 3j | ||||
| _v) ery ErI2 | _v) ery ErI2 | ||||
| gue (_ g | gue (_ g | ||||
| gu (e g | gu (e g | ||||
| _) gu (i g | _) gu (i g | ||||
| _) gui (dA gaI | |||||
| guide (@ gaId | |||||
| _) g (yn g | _) g (yn g | ||||
| o) g (y_ g | o) g (y_ g | ||||
| g (ynous_ =dZ | g (ynous_ =dZ | ||||
| inter (est Intr | inter (est Intr | ||||
| interfer Int@f'i@3 | interfer Int@f'i@3 | ||||
| _) int (erio+ %Int | _) int (erio+ %Int | ||||
| _) inter (n_ %Int3: | |||||
| _) inter (nK %Int3: | |||||
| _) inter (nal %Int3: | _) inter (nal %Int3: | ||||
| _) inter (pr %Int3: | _) inter (pr %Int3: | ||||
| _) inter (pol@ %Int3: | _) inter (pol@ %Int3: | ||||
| pull) ov oUv | pull) ov oUv | ||||
| m) ov (A u:v | m) ov (A u:v | ||||
| n) ov (el 0v | n) ov (el 0v | ||||
| p) over (@ 0v@ | |||||
| p) over (@ 0v3 | |||||
| pr) ov (e# u:v | pr) ov (e# u:v | ||||
| gr) ov (el 0v | gr) ov (el 0v | ||||
| tr) ov (er 0v | tr) ov (er 0v | ||||
| _) re (i@P2 r,i: | _) re (i@P2 r,i: | ||||
| _) rei (c raI | _) rei (c raI | ||||
| _) rei (l raI | _) rei (l raI | ||||
| _) rei (s raI | |||||
| _) re (iss r%i: | |||||
| _) rele (g rElI2 | _) rele (g rElI2 | ||||
| rele (nt rI2lE | rele (nt rI2lE | ||||
| rele (v rElI# | rele (v rElI# | ||||
| 1_) st (_ | 1_) st (_ | ||||
| _) st (_ s@nt | _) st (_ s@nt | ||||
| stein staIn | stein staIn | ||||
| ti) ssue Su: | |||||
| _) s (u s | _) s (u s | ||||
| ss (ue S | |||||
| ssue Su: | |||||
| ssur S3 | ssur S3 | ||||
| a) ssur SU@ | a) ssur SU@ | ||||
| a) ssure S'U@ | a) ssure S'U@ |
| me $u // reflexive | me $u // reflexive | ||||
| te $u | te $u | ||||
| nos $u | |||||
| nos $u $nounf | |||||
| la $u | la $u | ||||
| lo $u | lo $u | ||||
| las $u | las $u | ||||
| ?2 este $u+ $nounf 'estSi // this | ?2 este $u+ $nounf 'estSi // this | ||||
| ?2 estes $u+ $nounf 'estSis // these | ?2 estes $u+ $nounf 'estSis // these | ||||
| ?2 esta 'Est& $u+ $nounf | ?2 esta 'Est& $u+ $nounf | ||||
| ?2 nesta $u+ $nounf | |||||
| ?2 neste $u+ $nounf n'estSi //in this | ?2 neste $u+ $nounf n'estSi //in this | ||||
| ?2 nestes $u+ n'estSis //in these | |||||
| ?2 esse $u+ $nounf 'esi // that | ?2 esse $u+ $nounf 'esi // that | ||||
| essa 'Es& $u+ | essa 'Es& $u+ | ||||
| desse d'esy $u+ | |||||
| nesse n'esy $u+ | |||||
| desse $u+ $nounf | |||||
| desta $nounf | |||||
| nesse n'esy $u+ $nounf | |||||
| aquele &k'ely $u+ $nounf // that | aquele &k'ely $u+ $nounf // that | ||||
| aquela $u+ | |||||
| aquela $u+ $nounf | |||||
| daquele d&k'ely $u+ $nounf | daquele d&k'ely $u+ $nounf | ||||
| daquela $u+ $nounf | |||||
| que $u // pronunciation is in pt_rules | que $u // pronunciation is in pt_rules | ||||
| // possessive adjectives | // possessive adjectives | ||||
| meu $u+ $nounf | |||||
| minha $u+ | |||||
| meus $u+ | |||||
| minhas $u+ | |||||
| meu $u+ $nounf // meus | |||||
| minha $u+ $nounf // minhas | |||||
| teu $u+ $nounf | teu $u+ $nounf | ||||
| tua $u+ | |||||
| teus $u+ | |||||
| tuas $u+ | |||||
| tua $u+ $nounf | |||||
| seu $u+ $nounf | seu $u+ $nounf | ||||
| sua $u+ | |||||
| seus $u+ | |||||
| suas $u+ | |||||
| ?2 nosso $u+ // n'OsU | |||||
| ?2 nossa $u+ n'Os& | |||||
| ?2 nossos $u+ n'OsUs | |||||
| ?2 nossas $u+ n'Os&s | |||||
| sua $u+ $nounf | |||||
| ?2 nosso $u+ $nounf // n'OsU | |||||
| ?2 nossa $u+ $nounf n'Os& | |||||
| ?2 nossos $u+ $nounf n'OsUs | |||||
| ?2 nossas $u+ $nounf n'Os&s | |||||
| dele dely $u1+ | dele dely $u1+ | ||||
| dela $u+ | dela $u+ | ||||
| deles $u+ | deles $u+ | ||||
| nele nely $u1+ | nele nely $u1+ | ||||
| // prepositions | // prepositions | ||||
| de $u // of,from | |||||
| de $u $nounf // of,from | |||||
| do $u $nounf | do $u $nounf | ||||
| da $u $nounf | da $u $nounf | ||||
| dos $u | |||||
| das $u | |||||
| dos $u $nounf | |||||
| das $u $nounf | |||||
| dum $u | dum $u | ||||
| duma $u | duma $u | ||||
| duns $u | duns $u | ||||
| em $u // in,on,at | em $u // in,on,at | ||||
| no nu $u $nounf | no nu $u $nounf | ||||
| na $u | |||||
| ?2 nos nus# $u | |||||
| nas $u | |||||
| na $u $nounf | |||||
| num $u | num $u | ||||
| numa $u | numa $u | ||||
| nuns $u | nuns $u | ||||
| numas $u | numas $u | ||||
| por $u // by,for,through | |||||
| pelo $u | |||||
| ?2 pela $u p'el& | |||||
| pelos $u | |||||
| ?2 pelas $u p'el&s | |||||
| por $u $nounf // by,for,through | |||||
| pelo $u $nounf | |||||
| ?2 pela $u $nounf p'el& | |||||
| ao $u | ao $u | ||||
| à ,a: | à ,a: | ||||
| ?2 até $u // until | ?2 até $u // until | ||||
| ?2 desde $u // from,since | ?2 desde $u // from,since | ||||
| ?2 entre // between,among | ?2 entre // between,among | ||||
| ?2 por $u // by,for,through | |||||
| sobre $alt2 // on,above,about | sobre $alt2 // on,above,about | ||||
| ?2 sob // under,below | ?2 sob // under,below | ||||
| ?2 debaixo // under,below | ?2 debaixo // under,below | ||||
| algumas $u // some | algumas $u // some | ||||
| não n,&U~ $strend // not | não n,&U~ $strend // not | ||||
| // Words with two possible pronounciations | |||||
| jogo Z'OgU $verb | |||||
| gosto g'OstU $verb | |||||
| começo kom'EsU $verb | |||||
| almoço aUm'OsU $verb | |||||
| retorno xet'OrnU $verb | |||||
| acordo &k'OrdU $verb | |||||
| governo gov'ernU $noun | |||||
| ?2 olho 'oljU $noun | |||||
| ?4 olho 'ol^U $noun | |||||
| ?2 colher kolj'Er $noun | |||||
| ?4 colher kol^'Er $noun | |||||
| // MAIN WORD DICTIONARY | // MAIN WORD DICTIONARY | ||||
| //********************* | //********************* | ||||
| abordo $alt | abordo $alt | ||||
| aborto $alt $verb | aborto $alt $verb | ||||
| acerto $alt2 $noun | acerto $alt2 $noun | ||||
| acordo $alt $verb | |||||
| acertos $alt2 | acertos $alt2 | ||||
| acervo $alt2 | acervo $alt2 | ||||
| adepto $alt | adepto $alt | ||||
| alferes $alt | alferes $alt | ||||
| algozes $alt | algozes $alt | ||||
| alicerce $alt | alicerce $alt | ||||
| amanheça $alt2 | |||||
| amanheço $alt2 | |||||
| amanhecesse $alt2 | |||||
| almoço $alt $verb | |||||
| amarelo $alt | amarelo $alt | ||||
| ameba $alt | ameba $alt | ||||
| amores $alt2 | amores $alt2 | ||||
| anoitecesse $alt2 | |||||
| anoiteça $alt2 | |||||
| anoiteço $alt2 | |||||
| apego $alt2 $noun | apego $alt2 $noun | ||||
| apelo $alt $verb | apelo $alt $verb | ||||
| aposto $alt $verb | aposto $alt $verb | ||||
| apreço $alt2 | apreço $alt2 | ||||
| aperto $alt2 $noun | aperto $alt2 $noun | ||||
| apoio $alt $verb | apoio $alt $verb | ||||
| aprendeste $alt2 | |||||
| aprovo $alt | aprovo $alt | ||||
| arredores $alt | arredores $alt | ||||
| arremesso $alt2 $noun | arremesso $alt2 $noun | ||||
| arroz $alt2 | arroz $alt2 | ||||
| assembleia $alt | assembleia $alt | ||||
| ateia $alt | |||||
| aterro $alt2 $noun | aterro $alt2 $noun | ||||
| atmosfera $alt | atmosfera $alt | ||||
| atrozes $alt | atrozes $alt | ||||
| austero $alt | austero $alt | ||||
| autora $alt2 | autora $alt2 | ||||
| axé aSE | axé aSE | ||||
| bebeste $alt2 | |||||
| baqueta $alt2 | |||||
| beco $alt2 | beco $alt2 | ||||
| belo $alt | belo $alt | ||||
| besta $alt2 | besta $alt2 | ||||
| bezerra $alt2 | |||||
| bezerro $alt2 | |||||
| bilhete $alt2 | bilhete $alt2 | ||||
| boca $alt2 | boca $alt2 | ||||
| bochecha $alt2 | bochecha $alt2 | ||||
| caderneta $alt2 | caderneta $alt2 | ||||
| camiseta $alt2 | camiseta $alt2 | ||||
| cantora $alt2 | cantora $alt2 | ||||
| capacete $alt2 | |||||
| caractere $alt | caractere $alt | ||||
| caramelo $alt | caramelo $alt | ||||
| careta $alt2 | careta $alt2 | ||||
| carreta $alt2 | carreta $alt2 | ||||
| carroça $alt | |||||
| casebre $alt | casebre $alt | ||||
| castelo $alt | castelo $alt | ||||
| cateto $alt2 | cateto $alt2 | ||||
| catorze $alt2 | catorze $alt2 | ||||
| cebola $alt2 | cebola $alt2 | ||||
| cefaleia $alt | cefaleia $alt | ||||
| cerca $alt $verb | |||||
| cerco $alt $verb | cerco $alt $verb | ||||
| cesta $alt2 | cesta $alt2 | ||||
| cesto $alt2 | cesto $alt2 | ||||
| chamego $alt2 | chamego $alt2 | ||||
| chefe $alt | chefe $alt | ||||
| checam $alt | |||||
| cheque $alt | |||||
| chinelo $alt | chinelo $alt | ||||
| choro $alt2 $noun | choro $alt2 $noun | ||||
| chovesse $alt2 | |||||
| chupeta $alt2 | chupeta $alt2 | ||||
| clamores $alt2 | clamores $alt2 | ||||
| coco $alt2 | coco $alt2 | ||||
| cofre $alt | cofre $alt | ||||
| cogumelo $alt | |||||
| coice $alt2 | coice $alt2 | ||||
| colabore $alt | colabore $alt | ||||
| colheste $alt2 | |||||
| colete $alt2 | |||||
| colchete $alt2 | |||||
| colher $alt $verb | |||||
| colheres $alt $noun | |||||
| colmeia $alt | colmeia $alt | ||||
| colore $alt | colore $alt | ||||
| começo $alt2 $noun | começo $alt2 $noun | ||||
| comodo $alt2 | comodo $alt2 | ||||
| comera $alt2 | |||||
| comeres $alt2 | |||||
| comeste $alt2 | |||||
| concerto $alt2 $noun | concerto $alt2 $noun | ||||
| concordo $alt | concordo $alt | ||||
| conforto $alt $verb | conforto $alt $verb | ||||
| conheceste $alt2 | |||||
| conheço $alt2 | |||||
| consolo $alt2 $noun | consolo $alt2 $noun | ||||
| contivermos $alt | contivermos $alt | ||||
| controle $alt2 $noun | |||||
| controlo $alt2 $noun | |||||
| copa $alt | copa $alt | ||||
| copo $alt | copo $alt | ||||
| coreia $alt | coreia $alt | ||||
| corneta $alt2 | corneta $alt2 | ||||
| cornos $alt | cornos $alt | ||||
| corpos $alt | corpos $alt | ||||
| correste $alt2 | |||||
| corto $alt | corto $alt | ||||
| corveta $alt2 | corveta $alt2 | ||||
| corvos $alt | corvos $alt | ||||
| coto $alt2 | coto $alt2 | ||||
| couber $alt | |||||
| couberem $alt | |||||
| couberdes $alt | couberdes $alt | ||||
| couberes $alt | |||||
| coubermos $alt | |||||
| cratera $alt | cratera $alt | ||||
| crede $alt2 | crede $alt2 | ||||
| cresce $alt | cresce $alt | ||||
| crescem $alt | crescem $alt | ||||
| der $alt | der $alt | ||||
| derdes $alt | |||||
| desapego $alt2 $noun | desapego $alt2 $noun | ||||
| descabelo $alt | descabelo $alt | ||||
| desce $alt | desce $alt | ||||
| descem $alt | descem $alt | ||||
| descordo $alt | descordo $alt | ||||
| descova $alt2 | |||||
| desespero $alt2 $noun | desespero $alt2 $noun | ||||
| desfecho $alt2 | desfecho $alt2 | ||||
| desprezo $alt $verb | desprezo $alt $verb | ||||
| envolto $alt2 | envolto $alt2 | ||||
| enxerto $alt2 $noun | enxerto $alt2 $noun | ||||
| epopeia $alt | epopeia $alt | ||||
| erga $alt2 | |||||
| ergam $alt2 | |||||
| ergo $alt2 | |||||
| eritreia $alt | eritreia $alt | ||||
| erro $alt2 $noun | erro $alt2 $noun | ||||
| erros $alt2 | erros $alt2 | ||||
| esboço $alt $verb | esboço $alt $verb | ||||
| escopeta $alt2 | escopeta $alt2 | ||||
| escova $alt2 $noun | |||||
| escroto $alt2 | escroto $alt2 | ||||
| esforço $alt $verb | esforço $alt $verb | ||||
| esforços $alt | esforços $alt | ||||
| esgoto $alt2 $noun | esgoto $alt2 $noun | ||||
| esgotos $alt2 | |||||
| esperma $alt | esperma $alt | ||||
| espeto $alt2 $noun | espeto $alt2 $noun | ||||
| espiroqueta $alt2 | espiroqueta $alt2 | ||||
| espoleta $alt2 | espoleta $alt2 | ||||
| esposa $alt2 | esposa $alt2 | ||||
| esqueceste $alt2 | |||||
| esqueleto $alt2 | esqueleto $alt2 | ||||
| estiverdes $alt | estiverdes $alt | ||||
| estiveres $alt | |||||
| estivermos $alt | estivermos $alt | ||||
| estrela $alt2 | estrela $alt2 | ||||
| estremeceste $alt2 | |||||
| estrofe $alt | estrofe $alt | ||||
| estorno $alt $verb | estorno $alt $verb | ||||
| estorvo $alt $verb | estorvo $alt $verb | ||||
| febre $alt | febre $alt | ||||
| feitora $alt2 | feitora $alt2 | ||||
| fera $alt | fera $alt | ||||
| fere $alt | |||||
| ferem $alt | |||||
| ferozes $alt | ferozes $alt | ||||
| fezes $alt | fezes $alt | ||||
| ?1 fixe fiSy | ?1 fixe fiSy | ||||
| fizerdes $alt | |||||
| fizermos $alt | fizermos $alt | ||||
| foda $alt2 $verb | |||||
| folga $alt | folga $alt | ||||
| fogos $alt | fogos $alt | ||||
| foguete $alt2 | foguete $alt2 | ||||
| foice $alt2 | foice $alt2 | ||||
| forca $alt2 | forca $alt2 | ||||
| forças $alt2 | forças $alt2 | ||||
| fores $alt2 | |||||
| fordes $alt2 | |||||
| fores $alt2 | |||||
| forro $alt $verb | forro $alt $verb | ||||
| fosse $alt2 | fosse $alt2 | ||||
| fossem $alt2 | |||||
| frevo $alt2 | frevo $alt2 | ||||
| galera $alt | galera $alt | ||||
| galileia $alt | |||||
| gameta $alt2 | gameta $alt2 | ||||
| geleia $alt | geleia $alt | ||||
| gelo $alt $verb | gelo $alt $verb | ||||
| golpe $alt | golpe $alt | ||||
| gonorreia $alt | gonorreia $alt | ||||
| gorda $alt2 | gorda $alt2 | ||||
| gosto $alt $verb | |||||
| gota $alt2 | gota $alt2 | ||||
| governo $alt2 $noun | |||||
| gozo $alt $verb | gozo $alt $verb | ||||
| graveto $alt2 | graveto $alt2 | ||||
| grego $alt2 | |||||
| grelha $alt | grelha $alt | ||||
| grega $alt2 | |||||
| groselha $alt | groselha $alt | ||||
| grosso $alt2 | grosso $alt2 | ||||
| grozo $alt $verb | grozo $alt $verb | ||||
| hemorroida $alt | |||||
| hoje $alt2 | hoje $alt2 | ||||
| horrores $alt2 | |||||
| houverdes $alt | |||||
| houvermos $alt | houvermos $alt | ||||
| ideia $alt | ideia $alt | ||||
| insonoro $alt | insonoro $alt | ||||
| interesse $alt2 $noun | |||||
| joga $alt | joga $alt | ||||
| jogam $alt | |||||
| jogos $alt | |||||
| jogam$alt | |||||
| jogo $alt $verb | |||||
| jogos $alt | |||||
| jogue $alt | jogue $alt | ||||
| joguem $alt | |||||
| joguem $alt | |||||
| joguete $alt2 | joguete $alt2 | ||||
| lambreta $alt2 | lambreta $alt2 | ||||
| lebre $alt | lebre $alt | ||||
| mantiverdes $alt | mantiverdes $alt | ||||
| mantiveres $alt | mantiveres $alt | ||||
| mantivermos $alt | mantivermos $alt | ||||
| marcelo $alt | |||||
| marmelo $alt | marmelo $alt | ||||
| marreta $alt2 | marreta $alt2 | ||||
| martelo $alt | martelo $alt | ||||
| megera $alt | megera $alt | ||||
| melo $alt | melo $alt | ||||
| mentora $alt2 | mentora $alt2 | ||||
| meta $alt $noun | |||||
| meteoro $alt | |||||
| metro $alt | metro $alt | ||||
| mexa m'eS& | mexa m'eS& | ||||
| mexi meS'i | mexi meS'i | ||||
| mexo m'eSU | mexo m'eSU | ||||
| minueto $alt2 | |||||
| miolo $alt2 | miolo $alt2 | ||||
| miolos $alt | |||||
| moeda $alt | moeda $alt | ||||
| modo $alt | modo $alt | ||||
| modos $alt | modos $alt | ||||
| mureta $alt2 | mureta $alt2 | ||||
| mutreta $alt2 | mutreta $alt2 | ||||
| namoro $alt2 $noun | namoro $alt2 $noun | ||||
| naquele $alt2 | |||||
| negra $alt2 | |||||
| negro $alt2 | |||||
| naquela $nounf | |||||
| naquele $alt2 $nounf | |||||
| nervo $alt2 | |||||
| novos $alt | novos $alt | ||||
| obstetra $alt | obstetra $alt | ||||
| obsoleta $alt2 | obsoleta $alt2 | ||||
| obsoleto $alt2 | obsoleto $alt2 | ||||
| pbvivera $alt | |||||
| obtivera $alt | |||||
| obtivermos $alt | obtivermos $alt | ||||
| odisseia $alt | odisseia $alt | ||||
| onu $1 | onu $1 | ||||
| olho $alt2 $noun | |||||
| osso $alt2 | |||||
| ossos $alt | |||||
| opereta $alt2 | opereta $alt2 | ||||
| ordens $alt | ordens $alt | ||||
| osso $alt2 | |||||
| ostra $alt2 | ostra $alt2 | ||||
| ovos $alt | ovos $alt | ||||
| pachorra $alt2 | pachorra $alt2 | ||||
| padeceste $alt2 | |||||
| paexa paeSa | paexa paeSa | ||||
| palacete $alt2 | palacete $alt2 | ||||
| palheta $alt2 | palheta $alt2 | ||||
| pelo $alt $verb | pelo $alt $verb | ||||
| perde $alt | perde $alt | ||||
| perdem $alt | perdem $alt | ||||
| perede $alt2 | |||||
| pesa $alt | pesa $alt | ||||
| pesam $alt | pesam $alt | ||||
| pesque $alt | pesque $alt | ||||
| pesquem $alt | pesquem $alt | ||||
| peso $alt | |||||
| peso $alt2 $noun | |||||
| piloto $alt2 | |||||
| peso $alt $verb | |||||
| piloto $alt2 $noun | |||||
| pintora $alt2 | pintora $alt2 | ||||
| pirueta $alt2 | pirueta $alt2 | ||||
| plateia $alt | plateia $alt | ||||
| preta $alt2 | preta $alt2 | ||||
| preto $alt2 | preto $alt2 | ||||
| primavera $alt | primavera $alt | ||||
| profere $alt | |||||
| proferem $alt | |||||
| provo $alt | provo $alt | ||||
| puder $alt | puder $alt | ||||
| punheta $alt | |||||
| puderdes $alt | |||||
| pudermos $alt | |||||
| puserdes $alt | puserdes $alt | ||||
| quarteto $alt2 | quarteto $alt2 | ||||
| quinteto $alt2 | quinteto $alt2 | ||||
| quiserdes $alt | |||||
| quisermos $alt | quisermos $alt | ||||
| recomeço $alt2 $noun | recomeço $alt2 $noun | ||||
| recordo $alt | recordo $alt | ||||
| reprovo $alt | reprovo $alt | ||||
| resolve $alt | resolve $alt | ||||
| resolvem $alt | resolvem $alt | ||||
| retorno $alt $verb | |||||
| rixa x'iS& | rixa x'iS& | ||||
| rocha $alt | rocha $alt | ||||
| rock $alt | rock $alt | ||||
| rogas $alt | rogas $alt | ||||
| rola $alt2 $noun | |||||
| rolo $alt2 $noun | rolo $alt2 $noun | ||||
| rosna $alt | |||||
| rosnam $alt | |||||
| rosne $alt | |||||
| rosnem $alt | |||||
| rosno $alt | |||||
| rumores $alt2 | rumores $alt2 | ||||
| saleta $alt2 | saleta $alt2 | ||||
| sarjeta $alt | sarjeta $alt | ||||
| severa $alt | severa $alt | ||||
| severo $alt | severo $alt | ||||
| seborreia $alt | seborreia $alt | ||||
| seco $alt2 $noun | |||||
| secos $alt2 | |||||
| seca $alt2 $noun | |||||
| secas $alt2 | |||||
| seco $alt2 | |||||
| seco $alt $verb | |||||
| selo $alt $verb | selo $alt $verb | ||||
| selvagem seUv'aZeIN | selvagem seUv'aZeIN | ||||
| sexteto $alt2 | sexteto $alt2 | ||||
| tempero $alt2 $noun | tempero $alt2 $noun | ||||
| teta $alt2 | teta $alt2 | ||||
| tetra $alt | tetra $alt | ||||
| tiver $alt | |||||
| tivera $alt | |||||
| tiveres $alt | |||||
| tiverdes $alt | |||||
| tivermos $alt | tivermos $alt | ||||
| tocha $alt | tocha $alt | ||||
| toga $alt | toga $alt | ||||
| tola $alt2 | tola $alt2 | ||||
| tolo $alt2 | tolo $alt2 | ||||
| tolhe $alt | |||||
| tolhem $alt | |||||
| topo $alt $verb | topo $alt $verb | ||||
| torno $alt $verb | torno $alt $verb | ||||
| torres $alt2 | |||||
| torre $alt2 $noun | |||||
| torres $alt2 | |||||
| tortos $alt | tortos $alt | ||||
| traqueia $alt | traqueia $alt | ||||
| travesso $alt2 | travesso $alt2 | ||||
| tropa $alt | tropa $alt | ||||
| tropeço $alt2 $noun | tropeço $alt2 $noun | ||||
| trombeta $alt2 | trombeta $alt2 | ||||
| tumores $alt2 | |||||
| valeta $alt2 | valeta $alt2 | ||||
| vanessa $alt2 | vanessa $alt2 | ||||
| velozes $alt | velozes $alt | ||||
| verbo $alt | |||||
| verme $alt | verme $alt | ||||
| vierem $alt | vierem $alt | ||||
| violeta $alt2 | violeta $alt2 | ||||
| violoncelo $alt | |||||
| voga $alt | voga $alt | ||||
| vozes $alt | vozes $alt | ||||
| xarope $alt | xarope $alt | ||||
| xeque $alt | |||||
| zelo $alt $verb | zelo $alt $verb | ||||
| zero $alt | zero $alt | ||||
| zorra $alt2 | zorra $alt2 |
| an (K+ &~N | an (K+ &~N | ||||
| anh (A &~n^ | anh (A &~n^ | ||||
| am (_ =&U~ | am (_ =&U~ | ||||
| ?1 a (z_ 'a //eg: paz, rapaz, capaz, etc... | |||||
| a (z_ 'a //eg: paz, rapaz, capaz, etc... | |||||
| ?1 C) acç 'a's // eg: selecção, etc... | ?1 C) acç 'a's // eg: selecção, etc... | ||||
| ai aI | ai aI | ||||
| e (ctA_ E | e (ctA_ E | ||||
| e (ctAm_ E | e (ctAm_ E | ||||
| e (çA_ E | e (çA_ E | ||||
| e (çAm_ E | |||||
| e (çAm_ E | |||||
| e (de_ E | e (de_ E | ||||
| e (dem_ E | e (dem_ E | ||||
| ?1 _n) e (nhu i // eg: nenhum, nenhuma, nenhuns, nenhumas. | ?1 _n) e (nhu i // eg: nenhum, nenhuma, nenhuns, nenhumas. | ||||
| ?1 e (la_ 'E // eg: cadela, janela, vela, etc... | ?1 e (la_ 'E // eg: cadela, janela, vela, etc... | ||||
| ?1 C) e (cC ,E // eg: seleccionar, efectuar, etc... | ?1 C) e (cC ,E // eg: seleccionar, efectuar, etc... | ||||
| ?1 C) ecç 'E's // eg: selecção, etc... | |||||
| ?1 C) ecç 'Es // eg: selecção, etc... | |||||
| ?1 C) e (ã i // leão, panteão, etc. | ?1 C) e (ã i // leão, panteão, etc. | ||||
| ?1 C) e (a i // oceano, etc. | ?1 C) e (a i // oceano, etc. | ||||
| ?1 C) e (o 'i // eg: geologia, etc... | ?1 C) e (o 'i // eg: geologia, etc... | ||||
| ?1 l) e (ta 'E // eg: bicicleta, atleta. | ?1 l) e (ta 'E // eg: bicicleta, atleta. | ||||
| sf) e (ra_ E // esfera, biosfera | |||||
| sf) e (ra_ E // esfera, biosfera | |||||
| //sort | //sort | ||||
| _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 | |||||
| _com) e (L05_ e | |||||
| fiz) e (L05_ E | |||||
| _coub) e (L05_ E | |||||
| _exag) e (L05_ E | |||||
| _houv) e (L05_ E | |||||
| _perd) e (L05_ e | |||||
| _soub) e (L05_ E | |||||
| tiv) e (L05_ E // es- | |||||
| _atend) e (L06_ e | |||||
| _compreend) 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 | |||||
| _entend) e (L06_ e | |||||
| _estend) e (L06_ e | |||||
| _rend) e (L06_ e | |||||
| _vend) e (L06_ e | |||||
| respond) e (L06_ e // cor- | |||||
| _aborrec) e (L07_ e | |||||
| _adoec) e (L07_ e | |||||
| _amanhec) e (L07_ e | |||||
| _anoitec) e (L07_ e | |||||
| _arrepend) e (L07_ e | |||||
| _beb) e (L07_ e | |||||
| _com) e (L07_ e | |||||
| _defend) e (L07_ e | |||||
| _depend) e (L07_ e | |||||
| _eleg) e (L07_ e | |||||
| _enlouquec) e (L07_ e | |||||
| _entristec) 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 | |||||
| _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 | |||||
| _reapar) e (çL03_ e | |||||
| _reconh) e (çL03_ e | |||||
| _envaidec) e (L07_ e | |||||
| _envelhec) e (L07_ e | |||||
| _ergu) e (L07_ e | |||||
| _esclarec) e (L07_ e | |||||
| _escond) e (L07_ e | |||||
| _escurec) e (L07_ e | |||||
| _esquec) e (L07_ e | |||||
| _interromp) e (L07_ e | |||||
| _mord) e (L07_ e | |||||
| _morr) e (L07_ e | |||||
| _obedec) e (L07_ e | |||||
| _perd) e (L07_ e | |||||
| _sofr) e (L07_ e | |||||
| _tem) e (L07_ e | |||||
| aprend) e (L07_ e // re- | |||||
| bat) e (L07_ e // re- com- | |||||
| ced) e (L07_ e // pro- con- su- | |||||
| colh) e (L07_ e // & es- | |||||
| conhec) e (L07_ e // & re- des- | |||||
| corr) e (L07_ e // per- con- in- so- dis- | |||||
| entend) e (L07_ e | |||||
| merec) e (L07_ e // des- | |||||
| met) e (L07_ e // co- pro- arre- re- intro- compro- sub- | |||||
| padec) e (L07_ e // com- | |||||
| parec) e (L07_ e // a- rea- com- desa- | |||||
| preend) e (L07_ e // sur- com- | |||||
| respond) e (L07_ e // cor- | |||||
| torc) e (L07_ e // con- | |||||
| venc) e (L07_ e // con- | |||||
| vert) e (L07_ e // in- re- con- | |||||
| viv) e (L07_ e // re- | |||||
| qu) e (brL04_ E | |||||
| _hosp) e (dL03_ E | |||||
| _gr) e (gL03_ e | |||||
| _n) e (grL03_ e | |||||
| _estr) ei (L03_ EI | |||||
| _inv) e (jL04_ E | |||||
| _dec) e (pL04_ E | |||||
| _s) e (quL02_ E | |||||
| _p) 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 | |||||
| _ven) e (rL04_ E | |||||
| _v) e (rbL03_ E | |||||
| _h) e (rdL04_ E | |||||
| _) e (rguL02_ E | |||||
| _alb) e (rguL02_ E | |||||
| _enx) e (rguL02_ E | |||||
| _bez) e (rrL03_ 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 | |||||
| prom) e (tL03_ e // com- | |||||
| _derr) e (tL03_ e | |||||
| _rem) e (tL03_ e | |||||
| _sol) e (trL03_ E | |||||
| _pen) e (trL04_ E | |||||
| _atr) e (vL03_ e | |||||
| scr) e (vL03_ e // e- in- pre- ree- de- | |||||
| _pr) e (zL04_ E | |||||
| _embel) e (zL04_ E | |||||
| _acont) e (çL01_ e | |||||
| _arref) e (çL01_ e | |||||
| _aqu) e (çL03_ e | |||||
| _car) e (çL03_ e | |||||
| _estrem) e (çL03_ e | |||||
| _mer) e (çL03_ e | |||||
| _pad) e (çL03_ e // com- | |||||
| _per) e (çL03_ e | |||||
| par) e (çL03_ e // a- re- com- rea- desa- | |||||
| _esqu) e (çL03_ e | |||||
| _obed) e (çL03_ e | |||||
| _ofer) e (çL03_ e | |||||
| abast) e (çL03_ e // re- | |||||
| _aborr) e (çL03_ e | |||||
| _fortal) e (çL03_ e | |||||
| _ado) e (çL03_ e | |||||
| _amanh) e (çL03_ e | |||||
| _anoit) e (çL03_ e | |||||
| _enfraqu) e (çL03_ e | |||||
| _enlouqu) e (çL03_ e | |||||
| _enriqu) e (çL03_ e | |||||
| _entrist) e (çL03_ e | |||||
| _envaid) e (çL03_ e | |||||
| _envelh) e (çL03_ e | |||||
| _esclar) e (çL03_ e | |||||
| _forn) e (çL03_ e | |||||
| conh) e (çL03_ e // re- | |||||
| //endsort | //endsort | ||||
| oi oI | oi oI | ||||
| oi ($w_alt OI | oi ($w_alt OI | ||||
| oi ($w_alt2++ oI | oi ($w_alt2++ oI | ||||
| oi (a_ OI // ?? | |||||
| oi (a_ OI // ?? | |||||
| oi (cA_ OI | oi (cA_ OI | ||||
| oi (de_ OI | oi (de_ OI | ||||
| oi (s oI | oi (s oI | ||||
| o (ltAm_ O | o (ltAm_ O | ||||
| o (sA_ O | o (sA_ O | ||||
| o (so_N o // not for osos_ | |||||
| o (so_N o // not for osos_ | |||||
| o (sAm_ O | o (sAm_ O | ||||
| o (ssA_ O | o (ssA_ O | ||||
| _rev) o (lvL02_ O | _rev) o (lvL02_ O | ||||
| _desenv) o (lvL02_ O | _desenv) o (lvL02_ O | ||||
| _ent) o (pL02_ O | _ent) o (pL02_ O | ||||
| c) o (rrL01_ o // escorra, incorra, corra, recorra | |||||
| c) o (rrL01_ o // escorra, incorra, corra, recorra | |||||
| _m) o (rrL01_ o | _m) o (rrL01_ o | ||||
| _r) o (snL01_ O | |||||
| _c) o (spL02_ O | _c) o (spL02_ O | ||||
| p) ostos (_ Ost=Us# // dispostos etc. | p) ostos (_ Ost=Us# // dispostos etc. | ||||
| //endsort | //endsort | ||||
| r) u (_A u | r) u (_A u | ||||
| u (A_ 'u | u (A_ 'u | ||||
| u (am_ 'u | |||||
| u (em_ 'u | |||||
| u (am_ 'u | |||||
| u (em_ 'u | |||||
| ui uI | ui uI | ||||
| ui (_ 'uI | ui (_ 'uI | ||||
| u (iu w | u (iu w |
| replace 03 I i | replace 03 I i | ||||
| replace 03 I2 i | replace 03 I2 i | ||||
| replace 03 @ @/ | |||||
| name vietnam_hue | |||||
| language vi-hue | |||||
| phonemes vi-hue | |||||
| dictrules 1 | |||||
| gender male | |||||
| words 1 | |||||
| pitch 82 118 //80 118 | |||||
| //breath 75 75 60 40 15 10 | |||||
| //breathw 150 150 200 200 400 400 | |||||
| voicing 90 //18 | |||||
| flutter 20 |
| vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
| ipa ɚ | ipa ɚ | ||||
| unstressed | unstressed | ||||
| length 210 | |||||
| length 200 | |||||
| IfNextVowelAppend(r-) | IfNextVowelAppend(r-) | ||||
| FMT(vwl_en_us/3_us) | FMT(vwl_en_us/3_us) | ||||
| endphoneme | endphoneme | ||||
| IF nextPh(isRhotic) THEN | IF nextPh(isRhotic) THEN | ||||
| ChangePhoneme(3) | ChangePhoneme(3) | ||||
| ENDIF | ENDIF | ||||
| IF thisPh(isWordEnd) THEN | |||||
| FMT(vowel/@_6) | |||||
| ENDIF | |||||
| FMT(vowel/@_4) | FMT(vowel/@_4) | ||||
| endphoneme | endphoneme | ||||
| phoneme @/ // Schwa, end of word | |||||
| vowel starttype #@ endtype #@ | |||||
| unstressed | |||||
| length 130 | |||||
| FMT(vowel/@_low2) | |||||
| endphoneme | |||||
| phoneme @2 // Schwa, changes to I before a vowel | phoneme @2 // Schwa, changes to I before a vowel | ||||
| vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ |
| vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
| ipa ɐU+0303 | ipa ɐU+0303 | ||||
| length 180 | length 180 | ||||
| FMT(vnasal/a#_n) | |||||
| IF thisPh(isFinalVowel) THEN | |||||
| FMT(vnasal/W_n) | |||||
| ELSE | |||||
| FMT(vnasal/a#_n) | |||||
| ENDIF | |||||
| endphoneme | endphoneme | ||||
| phoneme &U~ | phoneme &U~ | ||||
| endphoneme | endphoneme | ||||
| // TESTING | |||||
| phoneme &2~ | |||||
| vowel starttype #@ endtype #@ | |||||
| ipa ɐU+0303 | |||||
| length 200 | |||||
| FMT(vnasal/W_n) | |||||
| endphoneme |
| IF prevPhW(w) THEN | IF prevPhW(w) THEN | ||||
| VowelStart(w/wi) | VowelStart(w/wi) | ||||
| ENDIF | ENDIF | ||||
| FMT(vowel/i_4) | |||||
| IF nextPh(n^) OR nextPh(c) THEN | |||||
| FMT(vnasal/ii_n) | |||||
| ELSE | |||||
| FMT(vowel/i_4) | |||||
| ENDIF | |||||
| endphoneme | endphoneme | ||||
| phoneme O | phoneme O | ||||
| vowel starttype #o endtype #o | vowel starttype #o endtype #o | ||||
| IF nextPh(kh) THEN | |||||
| length 95 | |||||
| IF nextPh(kh) OR nextPh(N) THEN | |||||
| length 110 | |||||
| ELSE | ELSE | ||||
| length 200 | length 200 | ||||
| ENDIF | ENDIF | ||||
| phoneme o | phoneme o | ||||
| vowel starttype #o endtype #o | vowel starttype #o endtype #o | ||||
| IF nextPh(kh) THEN | |||||
| length 95 | |||||
| IF nextPh(kh) OR nextPh(N) THEN | |||||
| length 110 | |||||
| ELSE | ELSE | ||||
| length 200 | length 200 | ||||
| ENDIF | ENDIF | ||||
| phoneme u@ | phoneme u@ | ||||
| vowel starttype #u endtype #@ | vowel starttype #u endtype #@ | ||||
| length 200 | |||||
| length 150 //200 | |||||
| FMT(vdiph2/uu@) | FMT(vdiph2/uu@) | ||||
| endphoneme | endphoneme | ||||
| FMT(vietnam/oe) | FMT(vietnam/oe) | ||||
| endphoneme | endphoneme | ||||
| phoneme iE // iê : viết, giệc | |||||
| vowel starttype #i endtype #e | |||||
| length 190 | |||||
| FMT(vietnam/ie_2) | |||||
| endphoneme | |||||
| phoneme kh | phoneme kh | ||||
| vls vel frc | vls vel frc | ||||
| lengthmod 3 | lengthmod 3 |
| //==================================================== | |||||
| // Vietnamese Phonemes - Make Huế Dialect | |||||
| //==================================================== | |||||
| phoneme 1 // ngang tone: level | |||||
| stress | |||||
| Tone(30, 2, envelope/p_level, NULL) // similar Hue dialect tone | |||||
| endphoneme | |||||
| phoneme 2 // huyền tone: low falling | |||||
| stress | |||||
| Tone(20, 25, envelope/p_fall,envelope/vi_6amp) // NULL) //20 8 | |||||
| endphoneme | |||||
| phoneme 3 // sắc Tone(rising | |||||
| stress | |||||
| Tone(2, 10, envelope/p_rise, NULL) // 25 50 45 75 | |||||
| endphoneme | |||||
| phoneme 4 // hỏi Tone(curve (dipping rising) | |||||
| stress | |||||
| Tone(20, 5, envelope/p_512,NULL) //Tone(55, 5, envelope/p_fallrise, NULL) //30 5 m 55 5 | |||||
| endphoneme | |||||
| phoneme 5 // ngã tone: broken (creaking rising) | |||||
| stress | |||||
| Tone(50,2, envelope/p_214, envelope/vi_5amp) // 28,58 m20 85 | |||||
| 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(25, 10, envelope/p_512, envelope/vi_6amp) // 40 20 | |||||
| endphoneme | |||||
| phoneme 7 // Tone(1 (ngang) at end of clause | |||||
| stress | |||||
| Tone(5, 40, envelope/p_level, NULL) //Tone(99, 50, envelope/p_fall, NULL) // 40 20 | |||||
| endphoneme | |||||
| ENDIF | ENDIF | ||||
| NextVowelStarts | NextVowelStarts | ||||
| VowelStart(n/n@) | |||||
| VowelStart(n/na) | |||||
| VowelStart(n/ne) | |||||
| VowelStart(n/ni) | |||||
| VowelStart(n/no) | |||||
| VowelStart(n/nu) | |||||
| VowelStart(n/nr@) | |||||
| VowelStart(n/nra) | |||||
| VowelStart(n/nre) | |||||
| VowelStart(n/nri) | |||||
| VowelStart(n/nro) | |||||
| VowelStart(n/nru) | |||||
| EndSwitch | EndSwitch | ||||
| IF prevPh(isNotVowel) AND nextPhW(isLiquid) THEN | IF prevPh(isNotVowel) AND nextPhW(isLiquid) THEN | ||||
| phonemetable kl base | phonemetable kl base | ||||
| include ph_greenlandic | include ph_greenlandic | ||||
| // 20.02.13 Add samplerate 4-bytes at start of phondata | |||||
| // 14.09.10 Recognize long and short frames in phondata | // 14.09.10 Recognize long and short frames in phondata | ||||
| // 02.09.10 Fix: Q sections were omitted from the converted phondata | // 02.09.10 Fix: Q sections were omitted from the converted phondata | ||||
| // 13.08.10 jonsd: Added Q lines. Use Address to set the displacement in phondata file. | // 13.08.10 jonsd: Added Q lines. Use Address to set the displacement in phondata file. | ||||
| exit (1); | exit (1); | ||||
| } | } | ||||
| xread = fread(buf_4, 4, 1, in); | |||||
| xread = fread(buf_4, 4, 1, in); // version number | |||||
| fwrite(buf_4, 4, 1, out); | |||||
| xread = fread(buf_4, 4, 1, in); // sample rate | |||||
| fwrite(buf_4, 4, 1, out); | fwrite(buf_4, 4, 1, out); | ||||
| while (fgets (line, sizeof(line), mfest)) | while (fgets (line, sizeof(line), mfest)) |
| #include "wx/wfstream.h" | #include "wx/wfstream.h" | ||||
| #include "wx/dir.h" | #include "wx/dir.h" | ||||
| #include "wx/filename.h" | #include "wx/filename.h" | ||||
| #include <wx/numdlg.h> | |||||
| #include "speak_lib.h" | #include "speak_lib.h" | ||||
| #include "main.h" | #include "main.h" | ||||
| extern void DisplayErrorFile(const char *fname); | extern void DisplayErrorFile(const char *fname); | ||||
| extern int utf8_out(unsigned int c, char *buf); | extern int utf8_out(unsigned int c, char *buf); | ||||
| extern void DrawEnvelopes(); | extern void DrawEnvelopes(); | ||||
| extern void ReadPhondataManifest(); | |||||
| char path_source[sizeof(path_home)+20]; | char path_source[sizeof(path_home)+20]; | ||||
| instn_category = (instn >> 12) & 0xf; | instn_category = (instn >> 12) & 0xf; | ||||
| data1 = instn & 0xff; | data1 = instn & 0xff; | ||||
| type2 = (instn >> 8) & 0xf; | type2 = (instn >> 8) & 0xf; | ||||
| fprintf(f_out, " %.3x: %.4x %s",pc-prog_buf,instn,instn_category_string[instn_category]); | |||||
| fprintf(f_out, " %.3x: %.4x %s",(unsigned int)(pc-prog_buf),instn,instn_category_string[instn_category]); | |||||
| switch(instn_category) | switch(instn_category) | ||||
| { | { | ||||
| static int count_frames = 0; | static int count_frames = 0; | ||||
| static int error_count = 0; | static int error_count = 0; | ||||
| static int resample_count = 0; | static int resample_count = 0; | ||||
| static int resample_fails = 0; | |||||
| static int then_count = 0; | static int then_count = 0; | ||||
| static int after_if = 0; | static int after_if = 0; | ||||
| const char *data_path; | const char *data_path; | ||||
| int prev_table; | int prev_table; | ||||
| int prev_mnemonic; | int prev_mnemonic; | ||||
| char fname[sizeof(path_source)+20]; | |||||
| if(f_report == NULL) | if(f_report == NULL) | ||||
| return; | return; | ||||
| int max = 0; | int max = 0; | ||||
| int length; | int length; | ||||
| int sr1, sr2; | int sr1, sr2; | ||||
| int failed; | |||||
| int len; | |||||
| int resample_wav = 0; | int resample_wav = 0; | ||||
| const char *fname2; | |||||
| char fname_temp[100]; | char fname_temp[100]; | ||||
| char msg[120]; | |||||
| int scale_factor=0; | int scale_factor=0; | ||||
| fseek(f,24,SEEK_SET); | fseek(f,24,SEEK_SET); | ||||
| if((sr1 != samplerate_native) || (sr2 != sr1*2)) | if((sr1 != samplerate_native) || (sr2 != sr1*2)) | ||||
| { | { | ||||
| #ifdef PLATFORM_WINDOWS | |||||
| if(sr1 != samplerate_native) | |||||
| { | |||||
| fprintf(f_errors,"Wrong samplerate %d, wants %d\n",sr1,samplerate_native); | |||||
| error("Wrong samplerate: %s",fname); | |||||
| } | |||||
| if(sr2 != sr1*2) | |||||
| int fd_temp; | |||||
| char command[sizeof(path_source)+200]; | |||||
| failed = 0; | |||||
| #ifdef PLATFORM_POSIX | |||||
| strcpy(fname_temp,"/tmp/espeakXXXXXX"); | |||||
| if((fd_temp = mkstemp(fname_temp)) >= 0) | |||||
| { | { | ||||
| error("Not mono: %s",fname); | |||||
| close(fd_temp); | |||||
| } | } | ||||
| #else | #else | ||||
| { | |||||
| int fd_temp; | |||||
| char command[sizeof(path_source)+200]; | |||||
| strcpy(fname_temp,"/tmp/espeakXXXXXX"); | |||||
| if((fd_temp = mkstemp(fname_temp)) >= 0) | |||||
| { | |||||
| close(fd_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); | |||||
| } | |||||
| } | |||||
| strcpy(fname_temp,tmpnam(NULL)); | |||||
| #endif | |||||
| if(GetFileLength(fname_temp) <= 0) | |||||
| fname2 = fname; | |||||
| len = strlen(fname); | |||||
| if(strcmp(&fname[len-4], ".wav") == 0) | |||||
| { | |||||
| strcpy(msg, fname); | |||||
| msg[len-4] = 0; | |||||
| fname2 = msg; | |||||
| } | |||||
| sprintf(command,"sox \"%s%s.wav\" -r %d -c1 -t wav %s\n",path_source,fname2,samplerate_native, fname_temp); | |||||
| if(system(command) < 0) | |||||
| { | |||||
| failed = 1; | |||||
| } | |||||
| if(failed || (GetFileLength(fname_temp) <= 0)) | |||||
| { | |||||
| if(resample_fails < 2) | |||||
| error("Resample command failed: %s", command); | |||||
| resample_fails++; | |||||
| if(sr1 != samplerate_native) | |||||
| { | { | ||||
| error("Failed to resample: %s",command); | |||||
| remove(fname_temp); | |||||
| return(0); | |||||
| sprintf(msg, "Can't resample (%d to %d): %s", sr1, samplerate_native, fname); | |||||
| error("%s", msg); | |||||
| } | } | ||||
| 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" | |||||
| } | |||||
| #endif | |||||
| else | |||||
| { | |||||
| error("WAV file is not mono: %s", fname); | |||||
| } | |||||
| 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" | |||||
| } | } | ||||
| displ = ftell(f_phdata); | displ = ftell(f_phdata); | ||||
| p_start[2] = n_bytes >> 8; // index of next table | p_start[2] = n_bytes >> 8; // index of next table | ||||
| p_start[3] = n_bytes; | p_start[3] = n_bytes; | ||||
| LoadVoice(voice_name2,0); // reset the original phoneme table | |||||
| LoadVoiceVariant(save_voice_name,0); | |||||
| if(gui_flag != 0) | |||||
| { | |||||
| LoadVoice(voice_name2,0); // reset the original phoneme table | |||||
| LoadVoiceVariant(save_voice_name,0); | |||||
| } | |||||
| } // end of CompileEquivalents | } // end of CompileEquivalents | ||||
| case kINCLUDE: | case kINCLUDE: | ||||
| NextItem(tSTRING); | NextItem(tSTRING); | ||||
| sprintf(buf,"%s%s",path_source,item_string); | sprintf(buf,"%s%s",path_source,item_string); | ||||
| if((stack_ix < N_STACK) && (f = fopen_log(f_errors,buf,"rb")) != NULL) | if((stack_ix < N_STACK) && (f = fopen_log(f_errors,buf,"rb")) != NULL) | ||||
| { | { | ||||
| fprintf(f_errors,"include %s\n",item_string); | fprintf(f_errors,"include %s\n",item_string); | ||||
| n_envelopes = 0; | n_envelopes = 0; | ||||
| error_count = 0; | error_count = 0; | ||||
| resample_count = 0; | |||||
| memset(markers_used,0,sizeof(markers_used)); | memset(markers_used,0,sizeof(markers_used)); | ||||
| f_errors = stderr; | f_errors = stderr; | ||||
| // write a word so that further data doesn't start at displ=0 | // write a word so that further data doesn't start at displ=0 | ||||
| Write4Bytes(f_phdata,version_phdata); | Write4Bytes(f_phdata,version_phdata); | ||||
| Write4Bytes(f_phdata,samplerate_native); | |||||
| Write4Bytes(f_phindex,version_phdata); | Write4Bytes(f_phindex,version_phdata); | ||||
| memset(ref_hash_tab,0,sizeof(ref_hash_tab)); | memset(ref_hash_tab,0,sizeof(ref_hash_tab)); | ||||
| fclose(f_phtab); | fclose(f_phtab); | ||||
| fclose(f_phcontents); | fclose(f_phcontents); | ||||
| LoadPhData(); | |||||
| LoadVoice(voice_name2,0); | |||||
| LoadPhData(NULL); | |||||
| if(gui_flag != 0) | |||||
| LoadVoice(voice_name2,0); | |||||
| CompileReport(); | CompileReport(); | ||||
| report_dict = CompileAllDictionaries(); | report_dict = CompileAllDictionaries(); | ||||
| fprintf(stderr,"%s\n",fname); | fprintf(stderr,"%s\n",fname); | ||||
| } | } | ||||
| ReadPhondataManifest(); | |||||
| } // end of CompilePhonemeData | } // end of CompilePhonemeData | ||||
| char buf[sizeof(path_source)+120]; | char buf[sizeof(path_source)+120]; | ||||
| error_count = 0; | error_count = 0; | ||||
| resample_count = 0; | |||||
| sprintf(fname_errors,"%s%s",path_source,"error_intonation"); | sprintf(fname_errors,"%s%s",path_source,"error_intonation"); | ||||
| if((f_errors = fopen(fname_errors,"w")) == NULL) | if((f_errors = fopen(fname_errors,"w")) == NULL) | ||||
| { | { | ||||
| DisplayErrorFile(fname_errors); | DisplayErrorFile(fname_errors); | ||||
| } | } | ||||
| LoadPhData(); | |||||
| LoadPhData(NULL); | |||||
| } // end of CompileIntonation | } // end of CompileIntonation | ||||
| void CompilePhonemeData() | void CompilePhonemeData() | ||||
| { | { | ||||
| WavegenInit(22050, 0); | |||||
| WavegenSetVoice(voice); | |||||
| CompilePhonemeData2("phonemes"); | CompilePhonemeData2("phonemes"); | ||||
| return; | |||||
| } | |||||
| void CompileSampleRate() | |||||
| { | |||||
| long value; | |||||
| value = wxGetNumberFromUser(_T("Compile phoneme data with a specified sample rate"), _T("Sample rate"), _T("Resample (needs sox)"), 22050, 5000, 48000); | |||||
| if(value > 1000) | |||||
| { | |||||
| WavegenInit(value, 0); | |||||
| WavegenSetVoice(voice); | |||||
| CompilePhonemeData2("phonemes"); | |||||
| } | |||||
| } | } | ||||
| // set up indices into data_dictrules | // set up indices into data_dictrules | ||||
| InitGroups(tr); | 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 | // set up hash table for data_dictlist | ||||
| p = &(tr->data_dictlist[8]); | p = &(tr->data_dictlist[8]); |
| #include "prosodydisplay.h" | #include "prosodydisplay.h" | ||||
| #ifdef deleted | |||||
| static const char *about_string = "espeakedit: %s\nAuthor: Jonathan Duddington (c) 2009\n\n" | |||||
| static const char *about_string2 = "espeakedit: %s\nAuthor: Jonathan Duddington (c) 2009\n\n" | |||||
| "Licensed under GNU General Public License version 3\n" | "Licensed under GNU General Public License version 3\n" | ||||
| "http://espeak.sourceforge.net/"; | "http://espeak.sourceforge.net/"; | ||||
| #endif | |||||
| static const char *about_string = "<font size=0><b>espeakedit </b> %s<br>Author: Jonathan Duddington (c) 2009<br>" | static const char *about_string = "<font size=0><b>espeakedit </b> %s<br>Author: Jonathan Duddington (c) 2009<br>" | ||||
| "<a href=\"http://espeak.sourceforge.net/\">http://espeak.sourceforge.net</a><br>" | "<a href=\"http://espeak.sourceforge.net/\">http://espeak.sourceforge.net</a><br>" | ||||
| extern void init_z(); | extern void init_z(); | ||||
| extern void CompilePhonemeData(void); | extern void CompilePhonemeData(void); | ||||
| extern void CompileSampleRate(void); | |||||
| extern void CompileMbrola(); | extern void CompileMbrola(); | ||||
| extern void CompileIntonation(); | extern void CompileIntonation(); | ||||
| extern void InitSpectrumDisplay(); | extern void InitSpectrumDisplay(); | ||||
| if((strcmp(param,"--help")==0) || (strcmp(param,"-h")==0)) | if((strcmp(param,"--help")==0) || (strcmp(param,"-h")==0)) | ||||
| { | { | ||||
| printf(about_string,espeak_Info(NULL)); | |||||
| printf(help_text); | |||||
| printf(about_string2,espeak_Info(NULL)); | |||||
| printf("%s", help_text); | |||||
| exit(0); | exit(0); | ||||
| } | } | ||||
| ConfigInit(); | ConfigInit(); | ||||
| VoiceReset(0); | |||||
| WavegenSetVoice(voice); | |||||
| WavegenInitSound(); | |||||
| if(strcmp(param,"--compile")==0) | if(strcmp(param,"--compile")==0) | ||||
| { | { | ||||
| LoadPhData(NULL); | |||||
| samplerate_native = samplerate = 22050; | |||||
| CompilePhonemeData(); | CompilePhonemeData(); | ||||
| CompileIntonation(); | CompileIntonation(); | ||||
| exit(0); | |||||
| } | } | ||||
| exit(0); | |||||
| } | } | ||||
| ConfigInit(); | ConfigInit(); | ||||
| EVT_MENU(MENU_PATH3, MyFrame::OnOptions) | EVT_MENU(MENU_PATH3, MyFrame::OnOptions) | ||||
| EVT_MENU(MENU_PATH4, MyFrame::OnOptions) | EVT_MENU(MENU_PATH4, MyFrame::OnOptions) | ||||
| EVT_MENU(MENU_COMPILE_PH, MyFrame::OnTools) | EVT_MENU(MENU_COMPILE_PH, MyFrame::OnTools) | ||||
| EVT_MENU(MENU_COMPILE_PH2, MyFrame::OnTools) | |||||
| EVT_MENU(MENU_COMPILE_DICT, MyFrame::OnTools) | EVT_MENU(MENU_COMPILE_DICT, MyFrame::OnTools) | ||||
| EVT_MENU(MENU_COMPILE_DICT_DEBUG, MyFrame::OnTools) | EVT_MENU(MENU_COMPILE_DICT_DEBUG, MyFrame::OnTools) | ||||
| EVT_MENU(MENU_FORMAT_DICTIONARY, MyFrame::OnTools) | EVT_MENU(MENU_FORMAT_DICTIONARY, MyFrame::OnTools) | ||||
| int error_flag = 0; | int error_flag = 0; | ||||
| int result; | int result; | ||||
| int param; | int param; | ||||
| int srate; | |||||
| notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxSize(312,760)); | notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxSize(312,760)); | ||||
| // notebook->AddPage(voicedlg,_T("Voice"),FALSE); | // notebook->AddPage(voicedlg,_T("Voice"),FALSE); | ||||
| SetSize(pos.x, pos.y, size.GetWidth(), size.GetHeight()); | SetSize(pos.x, pos.y, size.GetWidth(), size.GetHeight()); | ||||
| LoadConfig(); | LoadConfig(); | ||||
| WavegenInitSound(); | |||||
| if((result = LoadPhData()) != 1) | |||||
| if((result = LoadPhData(&srate)) != 1) | |||||
| { | { | ||||
| if(result == -1) | if(result == -1) | ||||
| wxLogError(_T("Failed to read espeak-data/phontab,phondata,phonindex\nPath = ")+wxString(path_home,wxConvLocal)+_T("\n\nThe 'eSpeak' package needs to be installed")); | wxLogError(_T("Failed to read espeak-data/phontab,phondata,phonindex\nPath = ")+wxString(path_home,wxConvLocal)+_T("\n\nThe 'eSpeak' package needs to be installed")); | ||||
| wxLogError(_T("Wrong version of espeak-data at:\n")+ wxString(path_home,wxConvLocal)+_T("\nVersion 0x%x (expects 0x%x)"),result,version_phdata); | wxLogError(_T("Wrong version of espeak-data at:\n")+ wxString(path_home,wxConvLocal)+_T("\nVersion 0x%x (expects 0x%x)"),result,version_phdata); | ||||
| error_flag = 1; | error_flag = 1; | ||||
| srate = 22050; | |||||
| } | } | ||||
| WavegenInit(srate,0); | |||||
| WavegenInitSound(); | |||||
| f_trans = stdout; | f_trans = stdout; | ||||
| option_ssml = 1; | option_ssml = 1; | ||||
| void MyFrame::SetVoiceTitle(char *voice_name) | void MyFrame::SetVoiceTitle(char *voice_name) | ||||
| {//========================================== | {//========================================== | ||||
| char buf[100]; | char buf[100]; | ||||
| SetTitle(AppName + _T(" - ") + wxString(voice_name,wxConvLocal) + _T(" voice")); | |||||
| if(samplerate_native == 22050) | |||||
| sprintf(buf, " - %s voice", voice_name); | |||||
| else | |||||
| sprintf(buf, " - %s voice %dHz", voice_name, samplerate_native); | |||||
| SetTitle(AppName + wxString(buf,wxConvLocal)); | |||||
| if((data_menu != NULL) && (translator != NULL)) | if((data_menu != NULL) && (translator != NULL)) | ||||
| { | { | ||||
| sprintf(buf,"Compile &dictionary '%s'",translator->dictionary_name); | sprintf(buf,"Compile &dictionary '%s'",translator->dictionary_name); | ||||
| case MENU_COMPILE_PH: | case MENU_COMPILE_PH: | ||||
| CompilePhonemeData(); | CompilePhonemeData(); | ||||
| SetVoiceTitle(voice_name2); | |||||
| break; | |||||
| case MENU_COMPILE_PH2: | |||||
| CompileSampleRate(); | |||||
| SetVoiceTitle(voice_name2); | |||||
| break; | break; | ||||
| case MENU_COMPILE_MBROLA: | case MENU_COMPILE_MBROLA: |
| else | else | ||||
| if(type==espeakEVENT_PHONEME) | if(type==espeakEVENT_PHONEME) | ||||
| { | { | ||||
| char buf[10]; | |||||
| // char buf[10]; | |||||
| fprintf(f_events,"[%s]\n",WordToString(events->id.number)); //old version, only 4 characters bytes | fprintf(f_events,"[%s]\n",WordToString(events->id.number)); //old version, only 4 characters bytes | ||||
| // memcpy(buf, events->id.string, 8); | // memcpy(buf, events->id.string, 8); | ||||
| // buf[8] = 0; | // buf[8] = 0; | ||||
| #define N_CHARS 34 | #define N_CHARS 34 | ||||
| #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 | |||||
| continue; /* indicates unrecognised phoneme */ | continue; /* indicates unrecognised phoneme */ | ||||
| if((ph = phoneme_tab[phcode]) == NULL) | if((ph = phoneme_tab[phcode]) == NULL) | ||||
| continue; | continue; | ||||
| if((ph->type == phSTRESS) && (ph->std_length <= 4) && (ph->program == 0)) | if((ph->type == phSTRESS) && (ph->std_length <= 4) && (ph->program == 0)) | ||||
| { | { | ||||
| if(ph->std_length > 2) | if(ph->std_length > 2) | ||||
| else | else | ||||
| if(mnem != 0) | if(mnem != 0) | ||||
| { | { | ||||
| while((c = (mnem & 0xff)) != 0) | |||||
| while((c = (mnem & 0xff)) != 0) | |||||
| { | { | ||||
| *outptr++ = c; | *outptr++ = c; | ||||
| mnem = mnem >> 8; | mnem = mnem >> 8; | ||||
| path_dir1 = wxFileName(fname_lex).GetPath(); | path_dir1 = wxFileName(fname_lex).GetPath(); | ||||
| strcpy(buf_out, path_dir1.mb_str(wxConvLocal)); | strcpy(buf_out, path_dir1.mb_str(wxConvLocal)); | ||||
| sprintf(buf, "%s/IT_errors", buf_out); | sprintf(buf, "%s/IT_errors", buf_out); | ||||
| if((f_out = fopen(buf,"w")) == NULL) | if((f_out = fopen(buf,"w")) == NULL) | ||||
| { | { | ||||
| str = wxString(buf, wxConvLocal); | str = wxString(buf, wxConvLocal); | ||||
| if((p = strstr(buf,"//")) != NULL) | if((p = strstr(buf,"//")) != NULL) | ||||
| *p = 0; | *p = 0; | ||||
| if((sscanf(buf,"%s %s",word,temp)) < 2) | if((sscanf(buf,"%s %s",word,temp)) < 2) | ||||
| continue; | continue; | ||||
| fputc(*p, f_listx); // omit secondary stress marks | fputc(*p, f_listx); // omit secondary stress marks | ||||
| } | } | ||||
| fputc('\n',f_listx); | fputc('\n',f_listx); | ||||
| } | } | ||||
| else | else | ||||
| if((stress_posn1 != stress_posn2) && (stress_posn1 > 0) && (stress_posn2 > 0)) | if((stress_posn1 != stress_posn2) && (stress_posn1 > 0) && (stress_posn2 > 0)) | ||||
| return; | return; | ||||
| } | } | ||||
| path_dir1 = wxFileName(fname).GetPath(); | path_dir1 = wxFileName(fname).GetPath(); | ||||
| if((f_out = fopen("compare_de","w")) == NULL) | if((f_out = fopen("compare_de","w")) == NULL) | ||||
| { | { | ||||
| wxLogError(_T("Can't write file ")); | wxLogError(_T("Can't write file ")); | ||||
| FILE *f_in; | FILE *f_in; | ||||
| FILE *f_out; | FILE *f_out; | ||||
| char word[80]; | char word[80]; | ||||
| char word_in[80]; | char word_in[80]; | ||||
| char phonemes[N_WORD_PHONEMES]; | char phonemes[N_WORD_PHONEMES]; | ||||
| if(done) | if(done) | ||||
| n_out++; | n_out++; | ||||
| } | |||||
| } | |||||
| n_words++; | n_words++; | ||||
| } | } | ||||
| len = strlen(suffix); | len = strlen(suffix); | ||||
| if(len >= (wlen-2)) | if(len >= (wlen-2)) | ||||
| continue; | continue; | ||||
| if(ru_stress > (vcount - suffixes[sfx].syllables)) | if(ru_stress > (vcount - suffixes[sfx].syllables)) | ||||
| continue; | continue; | ||||
| if(strcmp(suffix,&word[wlen-len])==0) | if(strcmp(suffix,&word[wlen-len])==0) | ||||
| { | { | ||||
| strcpy(word2,word); | strcpy(word2,word); | ||||
| // skip leading spaces, numbers, etc | // skip leading spaces, numbers, etc | ||||
| if(feof(f_in)) break; | if(feof(f_in)) break; | ||||
| } | } | ||||
| // read utf8 bytes until a space, number or punctuation | // read utf8 bytes until a space, number or punctuation | ||||
| ix = 0; | ix = 0; | ||||
| while(!feof(f_in) && (c >= 'A') && (ix < sizeof(buf)-1)) | while(!feof(f_in) && (c >= 'A') && (ix < sizeof(buf)-1)) | ||||
| } | } | ||||
| buf[ix++] = 0; | buf[ix++] = 0; | ||||
| buf[ix] = 0; | buf[ix] = 0; | ||||
| // the buf may contain non-alphabetic characters | // the buf may contain non-alphabetic characters | ||||
| j = 0; | j = 0; | ||||
| n_chars = 0; | n_chars = 0; | ||||
| } | } | ||||
| } | } | ||||
| fclose(f_in); | fclose(f_in); | ||||
| } // end of CountWordFreq | } // end of CountWordFreq | ||||
| free(p); | free(p); | ||||
| } | } | ||||
| fclose(f_out); | fclose(f_out); | ||||
| } // end of Make WorkFreqList | } // end of Make WorkFreqList | ||||
| // Interpolation table to translate from words-per-minute to internal speed | // Interpolation table to translate from words-per-minute to internal speed | ||||
| // words-per-minute values (measured) | // words-per-minute values (measured) | ||||
| static float wpm1[N_WPM] = | static float wpm1[N_WPM] = | ||||
| {0, 82, 96, 108, 124, 134, 147, 162, 174, 189, 224, 259, 273, 289, 307, 326, 346, 361, 370 }; | |||||
| {0, 82, 96, 108, 124, 134, 147, 162, 174, 189, 224, 259, 273, 289, 307, 326, 346, 361, 370 }; | |||||
| // corresponding internal speed values | // corresponding internal speed values | ||||
| static float wpm2[N_WPM] = | |||||
| static float wpm2[N_WPM] = | |||||
| {0,253,200, 170, 140, 125, 110, 95, 85, 75, 55, 40, 35, 30, 25, 20, 15, 10, 5 }; | {0,253,200, 170, 140, 125, 110, 95, 85, 75, 55, 40, 35, 30, 25, 20, 15, 10, 5 }; | ||||
| unsigned char speed_lookup[290]; | unsigned char speed_lookup[290]; | ||||
| #ifdef deleted | #ifdef deleted | ||||
| void Test2() | void Test2() | ||||
| { | { | ||||
| // | |||||
| // | |||||
| char buf[120]; | char buf[120]; | ||||
| FILE *f; | FILE *f; | ||||
| FILE *f_out; | FILE *f_out; | ||||
| f = fopen("/home/jsd1/speechdata/text/test.txt","r"); | f = fopen("/home/jsd1/speechdata/text/test.txt","r"); | ||||
| if(f==NULL) | if(f==NULL) | ||||
| return; | return; | ||||
| while(!feof(f) && (ix < sizeof(textbuf)-2)) | while(!feof(f) && (ix < sizeof(textbuf)-2)) | ||||
| { | { |
| MENU_PROSODY, | MENU_PROSODY, | ||||
| MENU_COMPILE_PH, | MENU_COMPILE_PH, | ||||
| MENU_COMPILE_PH2, | |||||
| MENU_COMPILE_DICT, | MENU_COMPILE_DICT, | ||||
| MENU_COMPILE_DICT_DEBUG, | MENU_COMPILE_DICT_DEBUG, | ||||
| MENU_FORMAT_DICTIONARY, | MENU_FORMAT_DICTIONARY, |
| /*************************************************************************** | /*************************************************************************** | ||||
| * Copyright (C) 2005 to 2010 by Jonathan Duddington * | |||||
| * Copyright (C) 2005 to 2013 by Jonathan Duddington * | |||||
| * email: [email protected] * | * email: [email protected] * | ||||
| * * | * * | ||||
| * This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
| // DATA MENU | // DATA MENU | ||||
| data_menu = new wxMenu; | data_menu = new wxMenu; | ||||
| data_menu->Append(MENU_COMPILE_PH, _("Compile &phoneme data")); | data_menu->Append(MENU_COMPILE_PH, _("Compile &phoneme data")); | ||||
| data_menu->Append(MENU_COMPILE_PH2, _("Change sample &rate")); | |||||
| data_menu->Append(MENU_COMPILE_DICT, _("Compile &dictionary")); | data_menu->Append(MENU_COMPILE_DICT, _("Compile &dictionary")); | ||||
| data_menu->Append(MENU_COMPILE_DICT_DEBUG, _("Compile dictionary (debu&g)")); | data_menu->Append(MENU_COMPILE_DICT_DEBUG, _("Compile dictionary (debu&g)")); | ||||
| data_menu->AppendSeparator(); | data_menu->AppendSeparator(); |
| /*************************************************************************** | /*************************************************************************** | ||||
| * Copyright (C) 2005 to 2011 by Jonathan Duddington * | |||||
| * Copyright (C) 2005 to 2013 by Jonathan Duddington * | |||||
| * email: [email protected] * | * email: [email protected] * | ||||
| * * | * * | ||||
| * This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
| if((letter >= 0x250) && (letter <= 0x2a8)) | if((letter >= 0x250) && (letter <= 0x2a8)) | ||||
| { | { | ||||
| accent_data = letter_accents_250[letter - 0x250]; | accent_data = letter_accents_250[letter - 0x250]; | ||||
| } | |||||
| } | |||||
| if(accent_data != 0) | if(accent_data != 0) | ||||
| { | { | ||||
| // if the $accent flag is set for this letter, use the accents table (below) | // if the $accent flag is set for this letter, use the accents table (below) | ||||
| dict_flags[1] = 0; | dict_flags[1] = 0; | ||||
| if(Lookup(tr, &single_letter[1], ph_buf3) == 0) | if(Lookup(tr, &single_letter[1], ph_buf3) == 0) | ||||
| { | { | ||||
| single_letter[1] = ' '; | single_letter[1] = ' '; | ||||
| if((ph_buf[0]==0) && !iswspace(letter)) | if((ph_buf[0]==0) && !iswspace(letter)) | ||||
| Lookup(tr, "_??", ph_buf); | Lookup(tr, "_??", ph_buf); | ||||
| if(ph_buf[0] != 0) | if(ph_buf[0] != 0) | ||||
| { | { | ||||
| // speak the hexadecimal number of the character code | // speak the hexadecimal number of the character code | ||||
| static const char *roman_numbers = "ixcmvld"; | static const char *roman_numbers = "ixcmvld"; | ||||
| static int roman_values[] = {1,10,100,1000,5,50,500}; | static int roman_values[] = {1,10,100,1000,5,50,500}; | ||||
| acc = 0; | acc = 0; | ||||
| prev = 0; | prev = 0; | ||||
| subtract = 0x7fff; | subtract = 0x7fff; | ||||
| if(isdigit(word[0])) | if(isdigit(word[0])) | ||||
| return(0); // eg. 'xx2' | return(0); // eg. 'xx2' | ||||
| acc += prev; | acc += prev; | ||||
| if(acc < tr->langopts.min_roman) | if(acc < tr->langopts.min_roman) | ||||
| return(0); | return(0); | ||||
| static const char *M_Variant(int value) | static const char *M_Variant(int value) | ||||
| {//==================================== | {//==================================== | ||||
| // returns M, or perhaps MA or MB for some cases | // returns M, or perhaps MA or MB for some cases | ||||
| int teens = 0; | int teens = 0; | ||||
| if(((value % 100) > 10) && ((value % 100) < 20)) | if(((value % 100) > 10) && ((value % 100) < 20)) | ||||
| if(found_value == 0) | if(found_value == 0) | ||||
| { | { | ||||
| if((value % 100) >= 20) | |||||
| if((value % 100) >= 20) | |||||
| { | { | ||||
| Lookup(tr, "_0of", ph_of); | Lookup(tr, "_0of", ph_of); | ||||
| } | } | ||||
| if(is_ordinal) | if(is_ordinal) | ||||
| { | { | ||||
| strcpy(ph_ordinal, ph_ordinal2); | strcpy(ph_ordinal, ph_ordinal2); | ||||
| if(control & 4) | if(control & 4) | ||||
| { | { | ||||
| sprintf(string,"_%d%cx",value,ord_type); // LANG=hu, special word for 1. 2. when there are no higher digits | sprintf(string,"_%d%cx",value,ord_type); // LANG=hu, special word for 1. 2. when there are no higher digits | ||||
| } | } | ||||
| found_ordinal = found; | found_ordinal = found; | ||||
| } | } | ||||
| if(found == 0) | if(found == 0) | ||||
| { | { | ||||
| if(control & 2) | if(control & 2) | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| // no, speak as tens+units | // no, speak as tens+units | ||||
| if((control & 0x10) && (value < 10)) | if((control & 0x10) && (value < 10)) | ||||
| { | { | ||||
| // speak leading zero | // speak leading zero | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| if((is_ordinal) && | |||||
| if((is_ordinal) && | |||||
| ((units == 0) || (tr->langopts.numbers & NUM_SWAP_TENS) || (tr->langopts.numbers2 & NUM2_MULTIPLE_ORDINAL))) | ((units == 0) || (tr->langopts.numbers & NUM_SWAP_TENS) || (tr->langopts.numbers2 & NUM2_MULTIPLE_ORDINAL))) | ||||
| { | { | ||||
| sprintf(string,"_%dX%c", tens, ord_type); | sprintf(string,"_%dX%c", tens, ord_type); | ||||
| sprintf(string,"_%dX", tens); | sprintf(string,"_%dX", tens); | ||||
| Lookup(tr, string, ph_tens); | Lookup(tr, string, ph_tens); | ||||
| } | } | ||||
| if((ph_tens[0] == 0) && (tr->langopts.numbers & NUM_VIGESIMAL)) | if((ph_tens[0] == 0) && (tr->langopts.numbers & NUM_VIGESIMAL)) | ||||
| { | { | ||||
| // tens not found, (for example) 73 is 60+13 | // tens not found, (for example) 73 is 60+13 | ||||
| sprintf(string,"_%dX", tens & 0xfe); | sprintf(string,"_%dX", tens & 0xfe); | ||||
| Lookup(tr, string, ph_tens); | Lookup(tr, string, ph_tens); | ||||
| } | } | ||||
| ph_digits[0] = 0; | ph_digits[0] = 0; | ||||
| if(units > 0) | if(units > 0) | ||||
| { | |||||
| { | |||||
| found = 0; | found = 0; | ||||
| if((control & 2) && (digit_lookup[0] != 0)) | if((control & 2) && (digit_lookup[0] != 0)) | ||||
| { | { | ||||
| // we have an entry for this digit (possibly together with the next word) | // we have an entry for this digit (possibly together with the next word) | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if((is_ordinal) && (found_ordinal == 0) && (ph_ordinal[0] == 0)) | if((is_ordinal) && (found_ordinal == 0) && (ph_ordinal[0] == 0)) | ||||
| { | { | ||||
| if((value >= 20) && (((value % 10) == 0) || (tr->langopts.numbers & NUM_SWAP_TENS))) | if((value >= 20) && (((value % 10) == 0) || (tr->langopts.numbers & NUM_SWAP_TENS))) | ||||
| if(ph_ordinal[0] == 0) | if(ph_ordinal[0] == 0) | ||||
| Lookup(tr, "_ord", ph_ordinal); | Lookup(tr, "_ord", ph_ordinal); | ||||
| } | } | ||||
| if((tr->langopts.numbers & (NUM_SWAP_TENS | NUM_AND_UNITS)) && (ph_tens[0] != 0) && (ph_digits[0] != 0)) | if((tr->langopts.numbers & (NUM_SWAP_TENS | NUM_AND_UNITS)) && (ph_tens[0] != 0) && (ph_digits[0] != 0)) | ||||
| { | { | ||||
| Lookup(tr, "_0and", ph_and); | Lookup(tr, "_0and", ph_and); | ||||
| { | { | ||||
| if((next_phtype = phoneme_tab[(unsigned int)(ph_digits[0])]->type) == phSTRESS) | if((next_phtype = phoneme_tab[(unsigned int)(ph_digits[0])]->type) == phSTRESS) | ||||
| next_phtype = phoneme_tab[(unsigned int)(ph_digits[1])]->type; | next_phtype = phoneme_tab[(unsigned int)(ph_digits[1])]->type; | ||||
| if((phoneme_tab[(unsigned int)(ph_tens[ix])]->type == phVOWEL) && (next_phtype == phVOWEL)) | if((phoneme_tab[(unsigned int)(ph_tens[ix])]->type == phVOWEL) && (next_phtype == phVOWEL)) | ||||
| ph_tens[ix] = 0; | ph_tens[ix] = 0; | ||||
| } | } | ||||
| sprintf(string,"_%dC0",hundreds); | sprintf(string,"_%dC0",hundreds); | ||||
| found = Lookup(tr, string, ph_digits); | found = Lookup(tr, string, ph_digits); | ||||
| } | } | ||||
| if(!found) | if(!found) | ||||
| { | { | ||||
| sprintf(string,"_%dC",hundreds); | sprintf(string,"_%dC",hundreds); | ||||
| found = Lookup(tr, string, ph_digits); // is there a specific pronunciation for n-hundred ? | found = Lookup(tr, string, ph_digits); // is there a specific pronunciation for n-hundred ? | ||||
| } | } | ||||
| if(found) | if(found) | ||||
| { | { | ||||
| ph_100[0] = 0; | ph_100[0] = 0; | ||||
| x = 8; // use variant (feminine) for before thousands and millions | x = 8; // use variant (feminine) for before thousands and millions | ||||
| } | } | ||||
| if(LookupNum2(tr, tensunits, x | control & 0x100, buf2) != 0) | |||||
| if(LookupNum2(tr, tensunits, x | (control & 0x100), buf2) != 0) | |||||
| { | { | ||||
| if(tr->langopts.numbers & NUM_SINGLE_AND) | if(tr->langopts.numbers & NUM_SINGLE_AND) | ||||
| ph_hundred_and[0] = 0; // don't put 'and' after 'hundred' if there's 'and' between tens and units | ph_hundred_and[0] = 0; // don't put 'and' after 'hundred' if there's 'and' between tens and units | ||||
| // this is an ordinal suffix | // this is an ordinal suffix | ||||
| ordinal = 2; | ordinal = 2; | ||||
| flags[0] |= FLAG_SKIPWORDS; | flags[0] |= FLAG_SKIPWORDS; | ||||
| skipwords = 1; | |||||
| skipwords = 1; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| break; | break; | ||||
| n_digits++; | n_digits++; | ||||
| strcat(ph_out, buf1); | strcat(ph_out, buf1); | ||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| /*************************************************************************** | /*************************************************************************** | ||||
| * Copyright (C) 2005 to 2007 by Jonathan Duddington * | |||||
| * Copyright (C) 2005 to 2013 by Jonathan Duddington * | |||||
| * email: [email protected] * | * email: [email protected] * | ||||
| * * | * * | ||||
| * This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
| for(ix=0; ix < 1; ix++) | for(ix=0; ix < 1; ix++) | ||||
| delete m_lab[ix]; | delete m_lab[ix]; | ||||
| delete m_samplerate; | delete m_samplerate; | ||||
| delete m_save; | delete m_save; | ||||
| delete m_close; | delete m_close; | ||||
| {//=========================================== | {//=========================================== | ||||
| int id; | int id; | ||||
| int value; | int value; | ||||
| switch(id = event.GetId()) | switch(id = event.GetId()) | ||||
| { | { | ||||
| case wxID_SAVE: | case wxID_SAVE: | ||||
| value = GetNumeric(m_samplerate); | value = GetNumeric(m_samplerate); | ||||
| if(value > 0) WavegenInit(value,0); | if(value > 0) WavegenInit(value,0); | ||||
| Destroy(); | Destroy(); | ||||
| break; | break; | ||||
| void ConfigInit() | void ConfigInit() | ||||
| {//============== | {//============== | ||||
| long value; | |||||
| wxString string; | wxString string; | ||||
| wxString basedir; | wxString basedir; | ||||
| const char *path_base; | const char *path_base; | ||||
| #ifdef PLATFORM_WINDOWS | #ifdef PLATFORM_WINDOWS | ||||
| int found = 0; | int found = 0; | ||||
| char buf[200]; | char buf[200]; | ||||
| { | { | ||||
| sprintf(path_home,"%s\\espeak-data",path_base); | sprintf(path_home,"%s\\espeak-data",path_base); | ||||
| if(GetFileLength(path_home) == -2) | if(GetFileLength(path_home) == -2) | ||||
| found = 1; // an espeak-data directory exists | |||||
| found = 1; // an espeak-data directory exists | |||||
| } | } | ||||
| if(found == 0) | if(found == 0) | ||||
| if(pRegKey->Exists() ) | if(pRegKey->Exists() ) | ||||
| { | { | ||||
| wxString RegVal; | wxString RegVal; | ||||
| pRegKey->QueryValue(_T("Path"),RegVal); | |||||
| pRegKey->QueryValue(_T("Path"),RegVal); | |||||
| strncpy0(buf,RegVal.mb_str(wxConvLocal),sizeof(buf)); | strncpy0(buf,RegVal.mb_str(wxConvLocal),sizeof(buf)); | ||||
| path_base = buf; | path_base = buf; | ||||
| } | } | ||||
| wxFileConfig *pConfig = new wxFileConfig(_T("espeakedit")); | wxFileConfig *pConfig = new wxFileConfig(_T("espeakedit")); | ||||
| wxFileConfig::Set(pConfig); | wxFileConfig::Set(pConfig); | ||||
| pConfig->Read(_T("/samplerate"),&value,22050); | |||||
| #ifdef PLATFORM_WINDOWS | |||||
| value = 22050; | |||||
| #endif | |||||
| WavegenInit(value,0); | |||||
| basedir = wxString(path_base,wxConvLocal); // this is only used to set defaults for other paths if they are not in the config file | basedir = wxString(path_base,wxConvLocal); // this is only used to set defaults for other paths if they are not in the config file | ||||
| pConfig->Read(_T("/spectload"),&path_spectload,basedir+_T("/phsource")); | pConfig->Read(_T("/spectload"),&path_spectload,basedir+_T("/phsource")); | ||||
| pConfig->Read(_T("/spectload2"),&path_spectload2,basedir+_T("/phsource")); | pConfig->Read(_T("/spectload2"),&path_spectload2,basedir+_T("/phsource")); |
| static wxPen PEN_PHSTRESSED(wxColour(80,80,196),3,wxSOLID); | static wxPen PEN_PHSTRESSED(wxColour(80,80,196),3,wxSOLID); | ||||
| static wxPen PEN_PHSTRESSED2(wxColour(160,160,255),2,wxSOLID); | static wxPen PEN_PHSTRESSED2(wxColour(160,160,255),2,wxSOLID); | ||||
| typedef struct { | |||||
| unsigned int value; | |||||
| char *name; | |||||
| } NAMETAB; | |||||
| NAMETAB *manifest = NULL; | |||||
| int n_manifest; | |||||
| const char *LookupManifest(unsigned int addr) | |||||
| {//============================================= | |||||
| int ix; | |||||
| if(manifest != NULL) | |||||
| { | |||||
| for(ix=0; ix < n_manifest; ix++) | |||||
| { | |||||
| if(manifest[ix].value == addr) | |||||
| return(manifest[ix].name); | |||||
| if(manifest[ix].value > addr) | |||||
| break; | |||||
| } | |||||
| } | |||||
| return(""); | |||||
| } | |||||
| void ReadPhondataManifest() | |||||
| {//========================= | |||||
| // Read the phondata-manifest file | |||||
| FILE *f; | |||||
| int n_lines=0; | |||||
| int ix; | |||||
| char *p; | |||||
| unsigned int value; | |||||
| char buf[sizeof(path_home)+40]; | |||||
| char name[120]; | |||||
| sprintf(buf,"%s%c%s",path_home,PATHSEP,"phondata-manifest"); | |||||
| if((f = fopen(buf, "r")) == NULL) | |||||
| return; | |||||
| while(fgets(buf, sizeof(buf), f) != NULL) | |||||
| n_lines++; | |||||
| rewind(f); | |||||
| if(manifest != NULL) | |||||
| { | |||||
| for(ix=0; ix < n_manifest; ix++) | |||||
| free(manifest[ix].name); | |||||
| } | |||||
| if((manifest = (NAMETAB *)realloc(manifest, n_lines * sizeof(NAMETAB))) == NULL) | |||||
| return; | |||||
| n_manifest = 0; | |||||
| while(fgets(buf, sizeof(buf), f) != NULL) | |||||
| { | |||||
| if(!isalpha(buf[0])) | |||||
| continue; | |||||
| if(sscanf(&buf[2], "%x %s", &value, name) == 2) | |||||
| { | |||||
| if((p = (char *)malloc(strlen(name)+1)) != NULL) | |||||
| { | |||||
| strcpy(p, name); | |||||
| manifest[n_manifest].value = value; | |||||
| manifest[n_manifest].name = p; | |||||
| n_manifest++; | |||||
| } | |||||
| } | |||||
| } | |||||
| fclose(f); | |||||
| } | |||||
| ProsodyDisplay::ProsodyDisplay(wxWindow *parent, const wxPoint& pos, const wxSize& size) | ProsodyDisplay::ProsodyDisplay(wxWindow *parent, const wxPoint& pos, const wxSize& size) | ||||
| : wxScrolledWindow(parent, -1, pos, size, | : wxScrolledWindow(parent, -1, pos, size, | ||||
| wxSUNKEN_BORDER | wxNO_FULL_REPAINT_ON_RESIZE) | wxSUNKEN_BORDER | wxNO_FULL_REPAINT_ON_RESIZE) | ||||
| int ix; | int ix; | ||||
| wxString string; | wxString string; | ||||
| ReadPhondataManifest(); | |||||
| menu_envelopes = new wxMenu; | menu_envelopes = new wxMenu; | ||||
| // entries match those in envelope_data[] in intonation.cpp | // entries match those in envelope_data[] in intonation.cpp | ||||
| int ix; | int ix; | ||||
| const char *name = "?"; | const char *name = "?"; | ||||
| char buf[120]; | char buf[120]; | ||||
| char len_string[20]; | |||||
| if(index < 0) return; | if(index < 0) return; | ||||
| } | } | ||||
| y1 = p->pitch1; | y1 = p->pitch1; | ||||
| y2 = p->pitch2; | y2 = p->pitch2; | ||||
| 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); | |||||
| len_string[0] = 0; | |||||
| if(p->std_length > 0) | |||||
| sprintf(len_string," Length %d", p->std_length*2); | |||||
| sprintf(buf,"Stress %s%d Amp %2d LengthMod %2d Pitch %3d %3d %s PhFlags %.2x [%s%s]", | |||||
| emphasized,p->stresslevel&0x7,p->amp, p->length,y1,y2,name,p->ph->phflags, LookupManifest(p->phontab_addr), len_string); | |||||
| wxLogStatus(wxString(buf,wxConvLocal)); | wxLogStatus(wxString(buf,wxConvLocal)); | ||||
| } | } | ||||
| adding_page = 2; // work around for wxNotebook bug (version 2.8.7) | adding_page = 2; // work around for wxNotebook bug (version 2.8.7) | ||||
| screenpages->AddPage(prosodycanvas, _T("Prosody"), true); | screenpages->AddPage(prosodycanvas, _T("Prosody"), true); | ||||
| } | } | ||||
| { | { | ||||
| int ix; | int ix; | ||||
| int fd_temp; | int fd_temp; | ||||
| const char *resample; | |||||
| int header[3]; | int header[3]; | ||||
| char command[sizeof(fname2)+sizeof(fname2)+40]; | char command[sizeof(fname2)+sizeof(fname2)+40]; | ||||
| fclose(f); | fclose(f); | ||||
| f = NULL; | f = NULL; | ||||
| if(header[2] == samplerate) | |||||
| resample = ""; | |||||
| else | |||||
| resample = "polyphase"; | |||||
| strcpy(fname_temp,"/tmp/espeakXXXXXX"); | strcpy(fname_temp,"/tmp/espeakXXXXXX"); | ||||
| if((fd_temp = mkstemp(fname_temp)) >= 0) | if((fd_temp = mkstemp(fname_temp)) >= 0) | ||||
| { | { | ||||
| close(fd_temp); | close(fd_temp); | ||||
| // sprintf(fname_temp,"%s.wav",tmpnam(NULL)); | |||||
| sprintf(command,"sox \"%s\" -r %d -w -s -c1 %s %s\n", fname, samplerate, fname_temp, resample); | |||||
| sprintf(command,"sox \"%s\" -r %d -c1 -t wav %s\n", fname, samplerate, fname_temp); | |||||
| if(system(command) == 0) | if(system(command) == 0) | ||||
| { | { | ||||
| fname = fname_temp; | fname = fname_temp; |
| 15,15,15,15,15}; // 370 | 15,15,15,15,15}; // 370 | ||||
| // wav_factor adjustments for speeds 350 to 450 | // wav_factor adjustments for speeds 350 to 450 | ||||
| // Use this to calibrate speed for wpm 350-450 | |||||
| // Use this to calibrate speed for wpm 350-450 | |||||
| static unsigned char wav_factor_350[] = { | static unsigned char wav_factor_350[] = { | ||||
| 120, 121, 120, 119, 119, // 350 | 120, 121, 120, 119, 119, // 350 | ||||
| 118, 118, 117, 116, 116, // 355 | 118, 118, 117, 116, 116, // 355 | ||||
| speed.min_sample_len = 420 - (wpm - 440); | speed.min_sample_len = 420 - (wpm - 440); | ||||
| } | } | ||||
| // adjust for different sample rates | |||||
| speed.min_sample_len = (speed.min_sample_len * samplerate_native) / 22050; | |||||
| speed.pause_factor = (256 * s1)/115; // full speed adjustment, used for pause length | speed.pause_factor = (256 * s1)/115; // full speed adjustment, used for pause length | ||||
| speed.clause_pause_factor = 0; | speed.clause_pause_factor = 0; | ||||
| if((amp >= 0) && (amp <= 20)) | if((amp >= 0) && (amp <= 20)) | ||||
| { | { | ||||
| option_amplitude = (amplitude_factor[amp] * 480)/256; | |||||
| option_amplitude = (amplitude_factor[amp] * 480)/256; | |||||
| } | } | ||||
| } | } | ||||
| #endif | #endif | ||||
| case phPAUSE: | case phPAUSE: | ||||
| last_pitch = 0; | last_pitch = 0; | ||||
| break; | break; | ||||
| case phSTOP: | case phSTOP: | ||||
| last_pitch = 0; | last_pitch = 0; | ||||
| if(prev->type == phFRICATIVE) | if(prev->type == phFRICATIVE) | ||||
| p->amp = tr->stress_amps[0]; // unless changed later | p->amp = tr->stress_amps[0]; // unless changed later | ||||
| p->length = 256; // TEMPORARY | p->length = 256; // TEMPORARY | ||||
| min_drop = 0; | min_drop = 0; | ||||
| if(p->newword) | if(p->newword) | ||||
| { | { | ||||
| if(prev->type==phLIQUID) | if(prev->type==phLIQUID) | ||||
| if((prev->type==phVOWEL) || (prev->type == phLIQUID)) | if((prev->type==phVOWEL) || (prev->type == phLIQUID)) | ||||
| { | { | ||||
| p->length = prev->length; | p->length = prev->length; | ||||
| if(p->type == phLIQUID) | if(p->type == phLIQUID) | ||||
| { | { | ||||
| p->length = speed1; | p->length = speed1; | ||||
| } | } | ||||
| if(next->type == phVSTOP) | if(next->type == phVSTOP) | ||||
| { | { | ||||
| p->length = (p->length * 160)/100; | p->length = (p->length * 160)/100; | ||||
| next->synthflags &= ~SFLAG_SEQCONTINUE; | next->synthflags &= ~SFLAG_SEQCONTINUE; | ||||
| if(next->type == phNASAL && next2->type != phVOWEL) | if(next->type == phNASAL && next2->type != phVOWEL) | ||||
| next->synthflags |= SFLAG_SEQCONTINUE; | next->synthflags |= SFLAG_SEQCONTINUE; | ||||
| if(next->type == phLIQUID) | if(next->type == phLIQUID) | ||||
| { | { | ||||
| next->synthflags |= SFLAG_SEQCONTINUE; | next->synthflags |= SFLAG_SEQCONTINUE; | ||||
| if(next2->type == phVOWEL) | if(next2->type == phVOWEL) | ||||
| { | { | ||||
| next->synthflags &= ~SFLAG_SEQCONTINUE; | next->synthflags &= ~SFLAG_SEQCONTINUE; |
| /*************************************************************************** | /*************************************************************************** | ||||
| * Copyright (C) 2005 to 2007 by Jonathan Duddington * | |||||
| * Copyright (C) 2005 to 2013 by Jonathan Duddington * | |||||
| * email: [email protected] * | * email: [email protected] * | ||||
| * * | * * | ||||
| * This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
| {//======================== | {//======================== | ||||
| int param; | int param; | ||||
| int result; | int result; | ||||
| int srate = 22050; // default sample rate | |||||
| // It seems that the wctype functions don't work until the locale has been set | // It seems that the wctype functions don't work until the locale has been set | ||||
| // to something other than the default "C". Then, not only Latin1 but also the | // to something other than the default "C". Then, not only Latin1 but also the | ||||
| #endif | #endif | ||||
| WavegenInit(22050,0); // 22050 | |||||
| if((result = LoadPhData()) != 1) | |||||
| if((result = LoadPhData(&srate)) != 1) | |||||
| { | { | ||||
| if(result == -1) | if(result == -1) | ||||
| { | { | ||||
| else | else | ||||
| fprintf(stderr,"Wrong version of espeak-data 0x%x (expects 0x%x) at %s\n",result,version_phdata,path_home); | fprintf(stderr,"Wrong version of espeak-data 0x%x (expects 0x%x) at %s\n",result,version_phdata,path_home); | ||||
| } | } | ||||
| WavegenInit(srate,0); | |||||
| LoadConfig(); | LoadConfig(); | ||||
| SetVoiceStack(NULL, ""); | SetVoiceStack(NULL, ""); | ||||
| SynthesizeInit(); | SynthesizeInit(); |
| {//=============================== | {//=============================== | ||||
| int param; | int param; | ||||
| int result; | int result; | ||||
| int srate = 22050; // default sample rate 22050 Hz | |||||
| err = EE_OK; | err = EE_OK; | ||||
| LoadConfig(); | LoadConfig(); | ||||
| WavegenInit(22050,0); // 22050 | |||||
| if((result = LoadPhData()) != 1) | |||||
| if((result = LoadPhData(&srate)) != 1) // reads sample rate from espeak-data/phontab | |||||
| { | { | ||||
| if(result == -1) | if(result == -1) | ||||
| { | { | ||||
| else | else | ||||
| fprintf(stderr,"Wrong version of espeak-data 0x%x (expects 0x%x) at %s\n",result,version_phdata,path_home); | fprintf(stderr,"Wrong version of espeak-data 0x%x (expects 0x%x) at %s\n",result,version_phdata,path_home); | ||||
| } | } | ||||
| WavegenInit(srate,0); | |||||
| memset(¤t_voice_selected,0,sizeof(current_voice_selected)); | memset(¤t_voice_selected,0,sizeof(current_voice_selected)); | ||||
| SetVoiceStack(NULL, ""); | SetVoiceStack(NULL, ""); |
| #include "translate.h" | #include "translate.h" | ||||
| #include "wave.h" | #include "wave.h" | ||||
| const char *version_string = "1.46.35 14.Feb.13"; | |||||
| const int version_phdata = 0x014631; | |||||
| const char *version_string = "1.46.37 20.Feb.13"; | |||||
| const int version_phdata = 0x014636; | |||||
| int option_device_number = -1; | int option_device_number = -1; | ||||
| FILE *f_logespeak = NULL; | FILE *f_logespeak = NULL; | ||||
| } // end of ReadPhFile | } // end of ReadPhFile | ||||
| int LoadPhData() | |||||
| {//============= | |||||
| int LoadPhData(int *srate) | |||||
| {//======================== | |||||
| int ix; | int ix; | ||||
| int n_phonemes; | int n_phonemes; | ||||
| int version; | int version; | ||||
| int result = 1; | int result = 1; | ||||
| int length; | int length; | ||||
| int rate; | |||||
| unsigned char *p; | unsigned char *p; | ||||
| int *pw; | int *pw; | ||||
| return(-1); | return(-1); | ||||
| if((tunes = (TUNE *)ReadPhFile((void *)(tunes),"intonations",&length)) == NULL) | if((tunes = (TUNE *)ReadPhFile((void *)(tunes),"intonations",&length)) == NULL) | ||||
| return(-1); | return(-1); | ||||
| wavefile_data = (unsigned char *)phondata_ptr; | |||||
| wavefile_data = (unsigned char *)phondata_ptr; | |||||
| n_tunes = length / sizeof(TUNE); | n_tunes = length / sizeof(TUNE); | ||||
| // read the version number from the first 4 bytes of phondata | |||||
| version = 0; | |||||
| // read the version number and sample rate from the first 8 bytes of phondata | |||||
| version = 0; // bytes 0-3, version number | |||||
| rate = 0; // bytes 4-7, sample rate | |||||
| for(ix=0; ix<4; ix++) | for(ix=0; ix<4; ix++) | ||||
| { | { | ||||
| version += (wavefile_data[ix] << (ix*8)); | version += (wavefile_data[ix] << (ix*8)); | ||||
| rate += (wavefile_data[ix+4] << (ix*8)); | |||||
| } | } | ||||
| if(version != version_phdata) | if(version != version_phdata) | ||||
| if(phoneme_tab_number >= n_phoneme_tables) | if(phoneme_tab_number >= n_phoneme_tables) | ||||
| phoneme_tab_number = 0; | phoneme_tab_number = 0; | ||||
| if(srate != NULL) | |||||
| *srate = rate; | |||||
| return(result); | return(result); | ||||
| } // end of LoadPhData | } // end of LoadPhData | ||||
| phdata->pd_param[i_LENGTH_MOD] = ph->length_mod; | phdata->pd_param[i_LENGTH_MOD] = ph->length_mod; | ||||
| if(ph->program == 0) | if(ph->program == 0) | ||||
| { | |||||
| return; | return; | ||||
| } | |||||
| end_flag = 0; | end_flag = 0; | ||||
| memcpy(&worddata->prev_vowel, &plist[0], sizeof(PHONEME_LIST)); | memcpy(&worddata->prev_vowel, &plist[0], sizeof(PHONEME_LIST)); | ||||
| } | } | ||||
| #ifdef _ESPEAKEDIT | |||||
| plist->std_length = phdata->pd_param[i_SET_LENGTH]; | plist->std_length = phdata->pd_param[i_SET_LENGTH]; | ||||
| if(phdata->sound_addr[0] != 0) | |||||
| plist->phontab_addr = phdata->sound_addr[0]; // FMT address | |||||
| else | |||||
| plist->phontab_addr = phdata->sound_addr[1]; // WAV address | |||||
| #endif | |||||
| } // end of InterpretPhoneme | } // end of InterpretPhoneme | ||||
| /*************************************************************************** | /*************************************************************************** | ||||
| * Copyright (C) 2005 to 2010 by Jonathan Duddington * | |||||
| * Copyright (C) 2005 to 2013 by Jonathan Duddington * | |||||
| * email: [email protected] * | * email: [email protected] * | ||||
| * * | * * | ||||
| * This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
| // list of phonemes in a clause | // list of phonemes in a clause | ||||
| int n_phoneme_list=0; | int n_phoneme_list=0; | ||||
| PHONEME_LIST phoneme_list[N_PHONEME_LIST]; | |||||
| PHONEME_LIST phoneme_list[N_PHONEME_LIST+1]; | |||||
| int mbrola_delay; | int mbrola_delay; | ||||
| char mbrola_name[20]; | char mbrola_name[20]; | ||||
| DoPause(0,0); // isolate from the previous clause | DoPause(0,0); // isolate from the previous clause | ||||
| } | } | ||||
| while(ix < (*n_ph)) | |||||
| while((ix < (*n_ph)) && (ix < N_PHONEME_LIST-2)) | |||||
| { | { | ||||
| p = &phoneme_list[ix]; | p = &phoneme_list[ix]; | ||||
| { | { | ||||
| case phPAUSE: | case phPAUSE: | ||||
| DoPause(p->length,0); | DoPause(p->length,0); | ||||
| #ifdef _ESPEAKEDIT | |||||
| p->std_length = p->ph->std_length; | |||||
| #endif | |||||
| break; | break; | ||||
| case phSTOP: | case phSTOP: |
| /*************************************************************************** | /*************************************************************************** | ||||
| * Copyright (C) 2005 to 2007 by Jonathan Duddington * | |||||
| * Copyright (C) 2005 to 2013 by Jonathan Duddington * | |||||
| * email: [email protected] * | * email: [email protected] * | ||||
| * * | * * | ||||
| * This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
| unsigned char newword; // bit 0=start of word, bit 1=end of clause, bit 2=start of sentence | unsigned char newword; // bit 0=start of word, bit 1=end of clause, bit 2=start of sentence | ||||
| unsigned char pitch1; | unsigned char pitch1; | ||||
| unsigned char pitch2; | unsigned char pitch2; | ||||
| #ifdef _ESPEAKEDIT | |||||
| unsigned char std_length; | unsigned char std_length; | ||||
| unsigned int phontab_addr; | |||||
| #endif | |||||
| } PHONEME_LIST; | } PHONEME_LIST; | ||||
| // list of phonemes in a clause | // list of phonemes in a clause | ||||
| extern int n_phoneme_list; | extern int n_phoneme_list; | ||||
| extern PHONEME_LIST phoneme_list[N_PHONEME_LIST]; | |||||
| extern PHONEME_LIST phoneme_list[N_PHONEME_LIST+1]; | |||||
| extern unsigned int embedded_list[]; | extern unsigned int embedded_list[]; | ||||
| extern unsigned char env_fall[128]; | extern unsigned char env_fall[128]; | ||||
| frameref_t *LookupSpect(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, int *n_frames, PHONEME_LIST *plist); | frameref_t *LookupSpect(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, int *n_frames, PHONEME_LIST *plist); | ||||
| unsigned char *LookupEnvelope(int ix); | unsigned char *LookupEnvelope(int ix); | ||||
| int LoadPhData(); | |||||
| int LoadPhData(int *srate); | |||||
| void SynthesizeInit(void); | void SynthesizeInit(void); | ||||
| int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume); | int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume); |
| } | } | ||||
| MakePhonemeList(tr, clause_pause, new_sentence); | MakePhonemeList(tr, clause_pause, new_sentence); | ||||
| phoneme_list[N_PHONEME_LIST].ph = NULL; // recognize end of phoneme_list array, in Generate() | |||||
| phoneme_list[N_PHONEME_LIST].sourceix = 1; | |||||
| if(embedded_count) // ???? is this needed | if(embedded_count) // ???? is this needed | ||||
| { | { |
| /*************************************************************************** | /*************************************************************************** | ||||
| * Copyright (C) 2005 to 2007 by Jonathan Duddington * | |||||
| * Copyright (C) 2005 to 2013 by Jonathan Duddington * | |||||
| * email: [email protected] * | * email: [email protected] * | ||||
| * * | * * | ||||
| * This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
| if((n_ph_list + n_phoneme_list) >= N_PH_LIST) | if((n_ph_list + n_phoneme_list) >= N_PH_LIST) | ||||
| { | { | ||||
| n_phoneme_list = N_PH_LIST - n_ph_list - n_phoneme_list; | |||||
| n_phoneme_list = N_PH_LIST - n_ph_list; | |||||
| } | } | ||||
| memcpy(&ph_list[n_ph_list],phoneme_list,sizeof(PHONEME_LIST)*n_phoneme_list); | memcpy(&ph_list[n_ph_list],phoneme_list,sizeof(PHONEME_LIST)*n_phoneme_list); | ||||
| n_ph_list += n_phoneme_list; | n_ph_list += n_phoneme_list; | ||||
| } | } | ||||
| ph_list[N_PH_LIST].ph = NULL; // to recognize overrun off list (in Generate() ) | |||||
| t_phonetic->Clear(); | t_phonetic->Clear(); | ||||
| if(option_phonemes == 2) | if(option_phonemes == 2) | ||||
| { | { |
| voice->voicing = 64; | voice->voicing = 64; | ||||
| voice->consonant_amp = 100; | voice->consonant_amp = 100; | ||||
| voice->consonant_ampv = 100; | voice->consonant_ampv = 100; | ||||
| voice->samplerate = 22050; | |||||
| voice->samplerate = samplerate_native; | |||||
| memset(voice->klattv,0,sizeof(voice->klattv)); | memset(voice->klattv,0,sizeof(voice->klattv)); | ||||
| speed.fast_settings[0] = 450; | speed.fast_settings[0] = 450; | ||||
| if(tone_only) | if(tone_only) | ||||
| break; | break; | ||||
| priority = DEFAULT_LANGUAGE_PRIORITY; | priority = DEFAULT_LANGUAGE_PRIORITY; | ||||
| language_name[0] = 0; | language_name[0] = 0; | ||||
| sscanf(p,"%s %d",language_name,&priority); | sscanf(p,"%s %d",language_name,&priority); | ||||
| if(strcmp(language_name,"variant") == 0) | if(strcmp(language_name,"variant") == 0) | ||||
| break; | break; | ||||
| len = strlen(language_name) + 2; | len = strlen(language_name) + 2; | ||||
| // check for space in languages[] | // check for space in languages[] | ||||
| if(len < (sizeof(voice_languages)-langix-1)) | if(len < (sizeof(voice_languages)-langix-1)) | ||||
| { | { | ||||
| voice_languages[langix] = priority; | voice_languages[langix] = priority; | ||||
| strcpy(&voice_languages[langix+1],language_name); | strcpy(&voice_languages[langix+1],language_name); | ||||
| langix += len; | langix += len; | ||||
| } | } | ||||
| // only act on the first language line | // only act on the first language line | ||||
| if(language_set == 0) | if(language_set == 0) | ||||
| { | { | ||||
| strcpy(new_dictionary,language_type); | strcpy(new_dictionary,language_type); | ||||
| strcpy(phonemes_name,language_type); | strcpy(phonemes_name,language_type); | ||||
| SelectPhonemeTableName(phonemes_name); | SelectPhonemeTableName(phonemes_name); | ||||
| if(new_translator != NULL) | if(new_translator != NULL) | ||||
| DeleteTranslator(new_translator); | DeleteTranslator(new_translator); | ||||
| new_translator = SelectTranslator(translator_name); | new_translator = SelectTranslator(translator_name); | ||||
| langopts = &new_translator->langopts; | langopts = &new_translator->langopts; | ||||
| } | } | ||||
| { | { | ||||
| // voice variant name, not number | // voice variant name, not number | ||||
| sprintf(variant_name, "%s%s", variant_prefix, p); | sprintf(variant_name, "%s%s", variant_prefix, p); | ||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| if(variant_num > 0) | if(variant_num > 0) | ||||
| { | { | ||||
| if(variant_num < 10) | if(variant_num < 10) | ||||
| { | { | ||||
| // no language is specified. Get language from the named voice | // no language is specified. Get language from the named voice | ||||
| static char buf[60]; | static char buf[60]; | ||||
| if(voice_select2.name == NULL) | if(voice_select2.name == NULL) | ||||
| { | { | ||||
| if((voice_select2.name = voice_select2.identifier) == NULL) | if((voice_select2.name = voice_select2.identifier) == NULL) | ||||
| voice_select2.name = "default"; | voice_select2.name = "default"; | ||||
| } | } | ||||
| strncpy0(buf,voice_select2.name,sizeof(buf)); | strncpy0(buf,voice_select2.name,sizeof(buf)); | ||||
| variant_name = ExtractVoiceVariantName(buf,0,0); | variant_name = ExtractVoiceVariantName(buf,0,0); | ||||
| } | } | ||||
| if(skip==0) | if(skip==0) | ||||
| { | { | ||||
| voices2[ix2++] = vp; | |||||
| voices2[ix2++] = vp; | |||||
| } | } | ||||
| for(j=0; (j < vp->xx1) && (n_variants < N_VOICE_VARIANTS);) | for(j=0; (j < vp->xx1) && (n_variants < N_VOICE_VARIANTS);) | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| // a regular line, add it to the voices list | |||||
| // a regular line, add it to the voices list | |||||
| if((f_voice = fopen(fname,"r")) == NULL) | if((f_voice = fopen(fname,"r")) == NULL) | ||||
| continue; | continue; | ||||
| // pass voice file name within the voices directory | // pass voice file name within the voices directory | ||||
| voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, &buf[20]); | voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, &buf[20]); | ||||
| fclose(f_voice); | fclose(f_voice); | ||||
| else | else | ||||
| if(ftype > 0) | if(ftype > 0) | ||||
| { | { | ||||
| // a regular line, add it to the voices list | |||||
| // a regular line, add it to the voices list | |||||
| if((f_voice = fopen(fname,"r")) == NULL) | if((f_voice = fopen(fname,"r")) == NULL) | ||||
| continue; | continue; | ||||
| // pass voice file name within the voices directory | // pass voice file name within the voices directory | ||||
| voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, FindFileData.cFileName); | voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, FindFileData.cFileName); | ||||
| fclose(f_voice); | fclose(f_voice); | ||||
| else | else | ||||
| if(ftype > 0) | if(ftype > 0) | ||||
| { | { | ||||
| // a regular line, add it to the voices list | |||||
| // a regular line, add it to the voices list | |||||
| if((f_voice = fopen(fname,"r")) == NULL) | if((f_voice = fopen(fname,"r")) == NULL) | ||||
| continue; | continue; | ||||
| // pass voice file name within the voices directory | // pass voice file name within the voices directory | ||||
| voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, ent->d_name); | voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, ent->d_name); | ||||
| fclose(f_voice); | fclose(f_voice); |