Stellar Blade Un'esclusiva PS5 che sta facendo discutere per l'eccessiva bellezza della protagonista. Vieni a parlarne su Award & Oscar!
 
Pagina precedente | 1 2 | Pagina successiva

Costruzione modelli acustici per Julius

Ultimo Aggiornamento: 31/03/2015 21:03
Autore
Stampa | Notifica email    
OFFLINE
Post: 26
Sesso: Maschile
21/06/2013 15:31

A questo punto dobbiamo creare un albero decisionale, che possa aiutare Julius a riconoscere le parole che noi diciamo a microfono.
Questo albero, verrà navigato attraverso fonemi e sarà indispensabile a Julius per stabilire quale parola, contenuta nel modello acustico, più si avvicina a quella che lui ha sentito.

Apriamo risorse del computer, poi cygwin, poi home, poi nomeUtente, poi voxforge, poi manual.
Dentro la cartella manual, creiamo un nuovo file e chiamiamolo "global.ded".
Dentro al file global.ded, scriviamo quello che segue tra doppi apici (senza copiare i doppi apici!):
"AS sp
RS cmu
MP sil sil sp"
Non c'è bisogno di lasciare il rigo vuoto alla fine..
Aprite la cygwin e scrivete:
cd voxforge (invio)
cd manual (invio)
dos2unix global.ded (invio)
HDMan -A -D -T 1 -b sp -n fulllist -g global.ded -l flog dict-tri ../lexicon/voxforge_lexicon (invio)

Non chiudete la cygwin.

Questo creerà nella cartella manual, due nuovi file: dict-tri e fulllist.
Dentro la cartella manual, create un nuovo file e chiamatelo "fulllist1".
Aprite il file fulllist1 appena creato e lasciatelo aperto.
Aprite il file fulllist e copiatene l'intero contenuto, incollandolo dentro il file fulllist1. Chiudete il file fulllist e aprite il file triphones1.
Copiate l'intero contenuto del file triphones1 e chiudetelo.
Ponete la vostra attenzione sul file fullist1 e posizionate il cursore del mouse alla fine di quello che vi avete incollato dentro, state attenti a posizionare bene il cursore, in modo che sia esattamente alla fine di tutto quello che sta scritto, premete invio e incollate quello che avevate selezionato da triphones1, esattamente nel rigo vuoto che avete alla fine del file.
In pratica fulllist1 deve essere così costruito:
- contenuto di fullist + premi pulsante invio per andare a nuovo rigo;
- contenuto di triphones1.
Salvate fulllist1 e chiudetelo.
Create un nuovo file nella cartella manual e chiamatelo fixfulllist.pl.
Dentro il file fixfulllist.pl scrivete quel che segue tra doppi apici (senza copiare i doppi apici):
"#!/usr/bin/perl
use strict;
my ($line, $label, $filein, $fileout, %seen);
if (@ARGV != 2) {
print "usage: $0 filein fileout\n\n";
exit (0);
}
# read in command line arguments
($filein, $fileout) = @ARGV;

open (FILEIN,"$filein") || die ("Unable to open $filein for reading");
open (FILEOUT,">$fileout") || die ("Unable to open $fileout for writing");

%seen = ();
while ($line = ) {
chomp ($line);
unless ($seen{$line}) { # remove duplicate triphone names
$seen{$line} = 1;
print (FILEOUT "$line\n");
}
}
close(FILEOUT);"
Salvate il file fixfulllist.pl e chiudetelo.

Scrivete sulla cygwin:
dos2unix fulllist1 (invio)
dos2unix fixfulllist.pl (invio)
perl fixfulllist.pl fulllist1 fulllist (invio)

Non chiudete la cygwin.
Create un nuovo file nella vostra cartella manual e chiamatelo tree.hed.
Dentro a questo file incollate quel che segue tra doppi apici (senza copiare i doppi apici):
"RO 100 stats

TR 0

QS "R_NonBoundary" { *+* }
QS "R_Silence" { *+sil }
QS "R_Stop" { *+p,*+pd,*+b,*+t,*+td,*+d,*+dd,*+k,*+kd,*+g }
QS "R_Nasal" { *+m,*+n,*+en,*+ng }
QS "R_Fricative" { *+s,*+sh,*+z,*+f,*+v,*+ch,*+jh,*+th,*+dh }
QS "R_Liquid" { *+l,*+el,*+r,*+w,*+y,*+hh }
QS "R_Vowel" { *+eh,*+ih,*+ao,*+aa,*+uw,*+ah,*+ax,*+er,*+ay,*+oy,*+ey,*+iy,*+ow }
QS "R_C-Front" { *+p,*+pd,*+b,*+m,*+f,*+v,*+w }
QS "R_C-Central" { *+t,*+td,*+d,*+dd,*+en,*+n,*+s,*+z,*+sh,*+th,*+dh,*+l,*+el,*+r }
QS "R_C-Back" { *+sh,*+ch,*+jh,*+y,*+k,*+kd,*+g,*+ng,*+hh }
QS "R_V-Front" { *+iy,*+ih,*+eh }
QS "R_V-Central" { *+eh,*+aa,*+er,*+ao }
QS "R_V-Back" { *+uw,*+aa,*+ax,*+uh }
QS "R_Front" { *+p,*+pd,*+b,*+m,*+f,*+v,*+w,*+iy,*+ih,*+eh }
QS "R_Central" { *+t,*+td,*+d,*+dd,*+en,*+n,*+s,*+z,*+sh,*+th,*+dh,*+l,*+el,*+r,*+eh,*+aa,*+er,*+ao }
QS "R_Back" { *+sh,*+ch,*+jh,*+y,*+k,*+kd,*+g,*+ng,*+hh,*+aa,*+uw,*+ax,*+uh }
QS "R_Fortis" { *+p,*+pd,*+t,*+td,*+k,*+kd,*+f,*+th,*+s,*+sh,*+ch }
QS "R_Lenis" { *+b,*+d,*+dd,*+g,*+v,*+dh,*+z,*+sh,*+jh }
QS "R_UnFortLenis" { *+m,*+n,*+en,*+ng,*+hh,*+l,*+el,*+r,*+y,*+w }
QS "R_Coronal" { *+t,*+td,*+d,*+dd,*+n,*+en,*+th,*+dh,*+s,*+z,*+sh,*+ch,*+jh,*+l,*+el,*+r }
QS "R_NonCoronal" { *+p,*+pd,*+b,*+m,*+k,*+kd,*+g,*+ng,*+f,*+v,*+hh,*+y,*+w }
QS "R_Anterior" { *+p,*+pd,*+b,*+m,*+t,*+td,*+d,*+dd,*+n,*+en,*+f,*+v,*+th,*+dh,*+s,*+z,*+l,*+el,*+w }
QS "R_NonAnterior" { *+k,*+kd,*+g,*+ng,*+sh,*+hh,*+ch,*+jh,*+r,*+y }
QS "R_Continuent" { *+m,*+n,*+en,*+ng,*+f,*+v,*+th,*+dh,*+s,*+z,*+sh,*+hh,*+l,*+el,*+r,*+y,*+w }
QS "R_NonContinuent" { *+p,*+pd,*+b,*+t,*+td,*+d,*+dd,*+k,*+kd,*+g,*+ch,*+jh }
QS "R_Strident" { *+s,*+z,*+sh,*+ch,*+jh }
QS "R_NonStrident" { *+f,*+v,*+th,*+dh,*+hh }
QS "R_UnStrident" { *+p,*+pd,*+b,*+m,*+t,*+td,*+d,*+dd,*+n,*+en,*+k,*+kd,*+g,*+ng,*+l,*+el,*+r,*+y,*+w }
QS "R_Glide" { *+hh,*+l,*+el,*+r,*+y,*+w }
QS "R_Syllabic" { *+en,*+m,*+l,*+el,*+er }
QS "R_Unvoiced-Cons" { *+p,*+pd,*+t,*+td,*+k,*+kd,*+s,*+sh,*+f,*+th,*+hh,*+ch }
QS "R_Voiced-Cons" { *+jh,*+b,*+d,*+dd,*+dh,*+g,*+y,*+l,*+el,*+m,*+n,*+en,*+ng,*+r,*+v,*+w,*+z }
QS "R_Unvoiced-All" { *+p,*+pd,*+t,*+td,*+k,*+kd,*+s,*+sh,*+f,*+th,*+hh,*+ch,*+sil }
QS "R_Long" { *+iy,*+aa,*+ow,*+ao,*+uw,*+en,*+m,*+l,*+el }
QS "R_Short" { *+eh,*+ey,*+aa,*+ih,*+ay,*+oy,*+ah,*+ax,*+uh }
QS "R_Dipthong" { *+ey,*+ay,*+oy,*+aa,*+er,*+en,*+m,*+l,*+el }
QS "R_Front-Start" { *+ey,*+aa,*+er }
QS "R_Fronting" { *+ay,*+ey,*+oy }
QS "R_High" { *+ih,*+uw,*+aa,*+ax,*+iy }
QS "R_Medium" { *+ey,*+er,*+aa,*+ax,*+eh,*+en,*+m,*+l,*+el }
QS "R_Low" { *+eh,*+ay,*+aa,*+aw,*+ao,*+oy }
QS "R_Rounded" { *+ao,*+uw,*+aa,*+ax,*+oy,*+w }
QS "R_Unrounded" { *+eh,*+ih,*+aa,*+er,*+ay,*+ey,*+iy,*+aw,*+ah,*+ax,*+en,*+m,*+hh,*+l,*+el,*+r,*+y }
QS "R_NonAffricate" { *+s,*+sh,*+z,*+f,*+v,*+th,*+dh }
QS "R_Affricate" { *+ch,*+jh }
QS "R_IVowel" { *+ih,*+iy }
QS "R_EVowel" { *+eh,*+ey }
QS "R_AVowel" { *+eh,*+aa,*+er,*+ay,*+aw }
QS "R_OVowel" { *+ao,*+oy,*+aa }
QS "R_UVowel" { *+aa,*+ax,*+en,*+m,*+l,*+el,*+uw }
QS "R_Voiced-Stop" { *+b,*+d,*+dd,*+g }
QS "R_Unvoiced-Stop" { *+p,*+pd,*+t,*+td,*+k,*+kd }
QS "R_Front-Stop" { *+p,*+pd,*+b }
QS "R_Central-Stop" { *+t,*+td,*+d,*+dd }
QS "R_Back-Stop" { *+k,*+kd,*+g }
QS "R_Voiced-Fric" { *+z,*+sh,*+dh,*+ch,*+v }
QS "R_Unvoiced-Fric" { *+s,*+sh,*+th,*+f,*+ch }
QS "R_Front-Fric" { *+f,*+v }
QS "R_Central-Fric" { *+s,*+z,*+th,*+dh }
QS "R_Back-Fric" { *+sh,*+ch,*+jh }
QS "R_aa" { *+aa }
QS "R_ae" { *+ae }
QS "R_ah" { *+ah }
QS "R_ao" { *+ao }
QS "R_aw" { *+aw }
QS "R_ax" { *+ax }
QS "R_ay" { *+ay }
QS "R_b" { *+b }
QS "R_ch" { *+ch }
QS "R_d" { *+d }
QS "R_dd" { *+dd }
QS "R_dh" { *+dh }
QS "R_dx" { *+dx }
QS "R_eh" { *+eh }
QS "R_el" { *+el }
QS "R_en" { *+en }
QS "R_er" { *+er }
QS "R_ey" { *+ey }
QS "R_f" { *+f }
QS "R_g" { *+g }
QS "R_hh" { *+hh }
QS "R_ih" { *+ih }
QS "R_iy" { *+iy }
QS "R_jh" { *+jh }
QS "R_k" { *+k }
QS "R_kd" { *+kd }
QS "R_l" { *+l }
QS "R_m" { *+m }
QS "R_n" { *+n }
QS "R_ng" { *+ng }
QS "R_ow" { *+ow }
QS "R_oy" { *+oy }
QS "R_p" { *+p }
QS "R_pd" { *+pd }
QS "R_r" { *+r }
QS "R_s" { *+s }
QS "R_sh" { *+sh }
QS "R_t" { *+t }
QS "R_td" { *+td }
QS "R_th" { *+th }
QS "R_ts" { *+ts }
QS "R_uh" { *+uh }
QS "R_uw" { *+uw }
QS "R_v" { *+v }
QS "R_w" { *+w }
QS "R_y" { *+y }
QS "R_z" { *+z }
QS "L_NonBoundary" { *-* }
QS "L_Silence" { sil-* }
QS "L_Stop" { p-*,pd-*,b-*,t-*,td-*,d-*,dd-*,k-*,kd-*,g-* }
QS "L_Nasal" { m-*,n-*,en-*,ng-* }
QS "L_Fricative" { s-*,sh-*,z-*,f-*,v-*,ch-*,jh-*,th-*,dh-* }
QS "L_Liquid" { l-*,el-*,r-*,w-*,y-*,hh-* }
QS "L_Vowel" { eh-*,ih-*,ao-*,aa-*,uw-*,ah-*,ax-*,er-*,ay-*,oy-*,ey-*,iy-*,ow-* }
QS "L_C-Front" { p-*,pd-*,b-*,m-*,f-*,v-*,w-* }
QS "L_C-Central" { t-*,td-*,d-*,dd-*,en-*,n-*,s-*,z-*,sh-*,th-*,dh-*,l-*,el-*,r-* }
QS "L_C-Back" { sh-*,ch-*,jh-*,y-*,k-*,kd-*,g-*,ng-*,hh-* }
QS "L_V-Front" { iy-*,ih-*,eh-* }
QS "L_V-Central" { eh-*,aa-*,er-*,ao-* }
QS "L_V-Back" { uw-*,aa-*,ax-*,uh-* }
QS "L_Front" { p-*,pd-*,b-*,m-*,f-*,v-*,w-*,iy-*,ih-*,eh-* }
QS "L_Central" { t-*,td-*,d-*,dd-*,en-*,n-*,s-*,z-*,sh-*,th-*,dh-*,l-*,el-*,r-*,eh-*,aa-*,er-*,ao-* }
QS "L_Back" { sh-*,ch-*,jh-*,y-*,k-*,kd-*,g-*,ng-*,hh-*,aa-*,uw-*,ax-*,uh-* }
QS "L_Fortis" { p-*,pd-*,t-*,td-*,k-*,kd-*,f-*,th-*,s-*,sh-*,ch-* }
QS "L_Lenis" { b-*,d-*,dd-*,g-*,v-*,dh-*,z-*,sh-*,jh-* }
QS "L_UnFortLenis" { m-*,n-*,en-*,ng-*,hh-*,l-*,el-*,r-*,y-*,w-* }
QS "L_Coronal" { t-*,td-*,d-*,dd-*,n-*,en-*,th-*,dh-*,s-*,z-*,sh-*,ch-*,jh-*,l-*,el-*,r-* }
QS "L_NonCoronal" { p-*,pd-*,b-*,m-*,k-*,kd-*,g-*,ng-*,f-*,v-*,hh-*,y-*,w-* }
QS "L_Anterior" { p-*,pd-*,b-*,m-*,t-*,td-*,d-*,dd-*,n-*,en-*,f-*,v-*,th-*,dh-*,s-*,z-*,l-*,el-*,w-* }
QS "L_NonAnterior" { k-*,kd-*,g-*,ng-*,sh-*,hh-*,ch-*,jh-*,r-*,y-* }
QS "L_Continuent" { m-*,n-*,en-*,ng-*,f-*,v-*,th-*,dh-*,s-*,z-*,sh-*,hh-*,l-*,el-*,r-*,y-*,w-* }
QS "L_NonContinuent" { p-*,pd-*,b-*,t-*,td-*,d-*,dd-*,k-*,kd-*,g-*,ch-*,jh-* }
QS "L_Strident" { s-*,z-*,sh-*,ch-*,jh-* }
QS "L_NonStrident" { f-*,v-*,th-*,dh-*,hh-* }
QS "L_UnStrident" { p-*,pd-*,b-*,m-*,t-*,td-*,d-*,dd-*,n-*,en-*,k-*,kd-*,g-*,ng-*,l-*,el-*,r-*,y-*,w-* }
QS "L_Glide" { hh-*,l-*,el-*,r-*,y-*,w-* }
QS "L_Syllabic" { en-*,m-*,l-*,el-*,er-* }
QS "L_Unvoiced-Cons" { p-*,pd-*,t-*,td-*,k-*,kd-*,s-*,sh-*,f-*,th-*,hh-*,ch-* }
QS "L_Voiced-Cons" { jh-*,b-*,d-*,dd-*,dh-*,g-*,y-*,l-*,el-*,m-*,n-*,en-*,ng-*,r-*,v-*,w-*,z-* }
QS "L_Unvoiced-All" { p-*,pd-*,t-*,td-*,k-*,kd-*,s-*,sh-*,f-*,th-*,hh-*,ch-*,sil-* }
QS "L_Long" { iy-*,aa-*,ow-*,ao-*,uw-*,en-*,m-*,l-*,el-* }
QS "L_Short" { eh-*,ey-*,aa-*,ih-*,ay-*,oy-*,ah-*,ax-*,uh-* }
QS "L_Dipthong" { ey-*,ay-*,oy-*,aa-*,er-*,en-*,m-*,l-*,el-* }
QS "L_Front-Start" { ey-*,aa-*,er-* }
QS "L_Fronting" { ay-*,ey-*,oy-* }
QS "L_High" { ih-*,uw-*,aa-*,ax-*,iy-* }
QS "L_Medium" { ey-*,er-*,aa-*,ax-*,eh-*,en-*,m-*,l-*,el-* }
QS "L_Low" { eh-*,ay-*,aa-*,aw-*,ao-*,oy-* }
QS "L_Rounded" { ao-*,uw-*,aa-*,ax-*,oy-*,w-* }
QS "L_Unrounded" { eh-*,ih-*,aa-*,er-*,ay-*,ey-*,iy-*,aw-*,ah-*,ax-*,en-*,m-*,hh-*,l-*,el-*,r-*,y-* }
QS "L_NonAffricate" { s-*,sh-*,z-*,f-*,v-*,th-*,dh-* }
QS "L_Affricate" { ch-*,jh-* }
QS "L_IVowel" { ih-*,iy-* }
QS "L_EVowel" { eh-*,ey-* }
QS "L_AVowel" { eh-*,aa-*,er-*,ay-*,aw-* }
QS "L_OVowel" { ao-*,oy-*,aa-* }
QS "L_UVowel" { aa-*,ax-*,en-*,m-*,l-*,el-*,uw-* }
QS "L_Voiced-Stop" { b-*,d-*,dd-*,g-* }
QS "L_Unvoiced-Stop" { p-*,pd-*,t-*,td-*,k-*,kd-* }
QS "L_Front-Stop" { p-*,pd-*,b-* }
QS "L_Central-Stop" { t-*,td-*,d-*,dd-* }
QS "L_Back-Stop" { k-*,kd-*,g-* }
QS "L_Voiced-Fric" { z-*,sh-*,dh-*,ch-*,v-* }
QS "L_Unvoiced-Fric" { s-*,sh-*,th-*,f-*,ch-* }
QS "L_Front-Fric" { f-*,v-* }
QS "L_Central-Fric" { s-*,z-*,th-*,dh-* }
QS "L_Back-Fric" { sh-*,ch-*,jh-* }
QS "L_aa" { aa-* }
QS "L_ae" { ae-* }
QS "L_ah" { ah-* }
QS "L_ao" { ao-* }
QS "L_aw" { aw-* }
QS "L_ax" { ax-* }
QS "L_ay" { ay-* }
QS "L_b" { b-* }
QS "L_ch" { ch-* }
QS "L_d" { d-* }
QS "L_dd" { dd-* }
QS "L_dh" { dh-* }
QS "L_dx" { dx-* }
QS "L_eh" { eh-* }
QS "L_el" { el-* }
QS "L_en" { en-* }
QS "L_er" { er-* }
QS "L_ey" { ey-* }
QS "L_f" { f-* }
QS "L_g" { g-* }
QS "L_hh" { hh-* }
QS "L_ih" { ih-* }
QS "L_iy" { iy-* }
QS "L_jh" { jh-* }
QS "L_k" { k-* }
QS "L_kd" { kd-* }
QS "L_l" { l-* }
QS "L_m" { m-* }
QS "L_n" { n-* }
QS "L_ng" { ng-* }
QS "L_ow" { ow-* }
QS "L_oy" { oy-* }
QS "L_p" { p-* }
QS "L_pd" { pd-* }
QS "L_r" { r-* }
QS "L_s" { s-* }
QS "L_sh" { sh-* }
QS "L_t" { t-* }
QS "L_td" { td-* }
QS "L_th" { th-* }
QS "L_ts" { ts-* }
QS "L_uh" { uh-* }
QS "L_uw" { uw-* }
QS "L_v" { v-* }
QS "L_w" { w-* }
QS "L_y" { y-* }
QS "L_z" { z-* }

TR 2"

Dopo aver copiato quello di sopra, ricordatevi di lasciare un rigo vuoto alla fine di tree.hed (cioè dopo TR 2).
Salvate il file e chiudetelo.

Scrivete sulla cygwin:
dos2unix tree.hed (invio)
perl ../HTK_scripts/mkclscript.prl TB 350 monophones0 >> tree.hed (invio)

Non chiudete la cygwin.

Aprite nuovamente il file tree.hed e posizionate il cursore del mouse alla fine del file (cioè dopo l'ultimo carattere che vedete) e premete invio due volte (lasciando 2 righe vuote).
Aggiungete, continuando a scrivere (questa volta scrivendo i doppi apici):
TR 1

AU "fulllist"
CO "tiedlist"

ST "trees"

Non c'è bisogno del rigo vuoto alla fine. Salvate il file tree.hed e chiudetelo.
Create altre 3 cartelle dentro a manual:
-hmm13
-hmm14
-hmm15

Scrivete sopra la cygwin:
dos2unix tree.hed (invio)
HHEd -A -D -T 1 -H hmm12/macros -H hmm12/hmmdefs -M hmm13 tree.hed triphones1 (invio)
HERest -A -D -T 1 -T 1 -C config -I wintri.mlf -s stats -t 250.0 150.0 3000.0 -S train.scp -H hmm13/macros -H hmm13/hmmdefs -M hmm14 tiedlist (invio)
HERest -A -D -T 1 -T 1 -C config -I wintri.mlf -s stats -t 250.0 150.0 3000.0 -S train.scp -H hmm14/macros -H hmm14/hmmdefs -M hmm15 tiedlist (invio)

Questo creerà i seguenti file:
- in manual: tiedlist;
- in hmm13: hmmdefs e macros;
- in hmm14: hmmdefs e macros;
- in hmm15: hmmdefs e macros.

Abbiamo finito!
Avete appena concluso lo step 10 del tutorialvoxforge, che trovate qui: www.voxforge.org/home/dev/acousticmodels/windows/create/htkjulius/tutorial/triphones...

Nel prossimo post eseguiremo Julius, nella sua versione 4.2.1.
Amministra Discussione: | Chiudi | Sposta | Cancella | Modifica | Notifica email Pagina precedente | 1 2 | Pagina successiva
Nuova Discussione
 | 
Rispondi
Cerca nel forum

Feed | Forum | Bacheca | Album | Utenti | Cerca | Login | Registrati | Amministra
Crea forum gratis, gestisci la tua comunità! Iscriviti a FreeForumZone
FreeForumZone [v.6.1] - Leggendo la pagina si accettano regolamento e privacy
Tutti gli orari sono GMT+01:00. Adesso sono le 10:10. Versione: Stampabile | Mobile
Copyright © 2000-2024 FFZ srl - www.freeforumzone.com