Differences

This shows you the differences between two versions of the page.

Link to this comparison view

nlp-private:seg2xml3.pl [2015/04/22 21:12] (current)
ryancha created
Line 1: Line 1:
 +Authors: Deryle Lonsdale and Bruce Christensen
 +
 +==How pitch features are hooked in to the MaxEnt pipeline:==
 +
 +Overseen by the seg2xml3.pl script.<​br/>​
 +Helped along by [[getitems2.praat]],​ [[getpitch3.praat]],​ and [[getpitch-matrix.praat]]
 +
 +For each $basename.wav / $basename.seg file pair:
 +# Run "​$praatexe $praatcmddir/​getpitch3.praat $wavdir/​$thiswav"​ and extract the "File Features"​ from the praat output:
 +#: my $ffeats = "<​file_features>​\n";​
 +#: $ffeats .= sprintf("​%s %.2f %s\n", " <​minF0>",​ $minf0, "</​minF0>"​);​
 +#: $ffeats .= sprintf("​%s %.2f %s\n", " <​maxF0>",​ $maxf0, "</​maxF0>"​);​
 +#: $ffeats .= sprintf("​%s %.2f %s\n", " <​rangeF0>",​ $rangef0, "</​rangeF0>"​);​
 +#: $ffeats .= sprintf("​%s %.2f %s\n", " <​avgF0>",​ $avgf0, "</​avgF0>"​);​
 +#: $ffeats .= sprintf("​%s %.3f %s\n", " <​duration>",​ $duration, "</​duration>"​);​
 +#: $ffeats .= "</​file_features>​\n";​
 +# Use getpitch-matrix.praat to generate acfeats/​$basename.matrix from $basename.wav. Extract pitch features from the resultant matrix.
 +#: For each segment listed in the .seg file:
 +#:: Dump "​$this->​{beg}\n$this->​{end}\n"​ into a Praat command file at acfeats/​$basename.prc. I believe this simply tells praat where each slice begins.
 +# Use getitems2.praat cmdfile wavfile to get slice data. From this extract slice pitch (f0) info:
 +#:: $slicestr .= sprintf("​ <​begF0>​ %.2f </​begF0>​\n",​ $valbeg);
 +#:: $slicestr .= sprintf("​ <​endF0>​ %.2f </​endF0>​\n",​ $valend);
 +#:: $slicestr .= sprintf("​ <​minF0>​ %.2f </​minF0>​\n", ​ $valmin);
 +#:: $slicestr .= sprintf("​ <​maxF0>​ %.2f </​maxF0>​\n", ​ $valmax);
 +#:: $slicestr .= sprintf("​ <​tmaxF0>​ %.3f </​tmaxF0>​\n", ​ $tmax);
 +#:: $slicestr .= sprintf("​ <​tminF0>​ %.3f </​tminF0>​\n", ​ $tmin);
 +#: and slice formant (fx) info:
 +#:: $slicestr .= sprintf("​ <​begF1>​ %.2f </​begF1>​\n",​ $f1beg);
 +#:: $slicestr .= sprintf("​ <​endF1>​ %.2f </​endF1>​\n",​ $f1end);
 +#:: $slicestr .= sprintf("​ <​medF1>​ %.2f </​medF1>​\n",​ $f1median);
 +#:: $slicestr .= sprintf("​ <​begF2>​ %.2f </​begF2>​\n",​ $f2beg);
 +#:: $slicestr .= sprintf("​ <​endF2>​ %.2f </​endF2>​\n",​ $f2end);
 +#:: $slicestr .= sprintf("​ <​medF2>​ %.2f </​medF2>​\n",​ $f2median);
 +#:: $slicestr .= sprintf("​ <​begF3>​ %.2f </​begF3>​\n",​ $f3beg);
 +#:: $slicestr .= sprintf("​ <​endF3>​ %.2f </​endF3>​\n",​ $f3end);
 +#:: $slicestr .= sprintf("​ <​medF3>​ %.2f </​medF3>​\n",​ $f3median);​
 +#:: $slicestr .= sprintf("​ <​begF4>​ %.2f </​begF4>​\n",​ $f4beg);
 +#:: $slicestr .= sprintf("​ <​endF4>​ %.2f </​endF4>​\n",​ $f4end);
 +#:: $slicestr .= sprintf("​ <​medF4>​ %.2f </​medF4>​\n",​ $f4median);
 +#:: $slicestr .= sprintf("​ <​begF5>​ %.2f </​begF5>​\n",​ $f5beg);
 +#:: $slicestr .= sprintf("​ <​endF5>​ %.2f </​endF5>​\n",​ $f5end);
 +#:: $slicestr .= sprintf("​ <​medF5>​ %.2f </​medF5>​\n",​ $f5median);
 +#: plus assemble previously collected <​slice>​ tag properties, <​seglola>,​ possibly <​phoneme>​ tags, and pitch feature tags.
 +
 +Throw it all together and you get acfeats/​$basename.slx2
 +[[Category:​Spoken Language ID]]
  
nlp-private/seg2xml3.pl.txt ยท Last modified: 2015/04/22 21:12 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0