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:

  1. Run “$praatexe $praatcmddir/getpitch3.praat $wavdir/$thiswav” and extract the “File Features” from the praat output:
  2. : my $ffeats = “<file_features>\n”;
  3. : $ffeats .= sprintf("%s %.2f %s\n", " <minF0>", $minf0, “</minF0>”);
  4. : $ffeats .= sprintf("%s %.2f %s\n", " <maxF0>", $maxf0, “</maxF0>”);
  5. : $ffeats .= sprintf("%s %.2f %s\n", " <rangeF0>", $rangef0, “</rangeF0>”);
  6. : $ffeats .= sprintf("%s %.2f %s\n", " <avgF0>", $avgf0, “</avgF0>”);
  7. : $ffeats .= sprintf("%s %.3f %s\n", " <duration>", $duration, “</duration>”);
  8. : $ffeats .= “</file_features>\n”;
  9. Use getpitch-matrix.praat to generate acfeats/$basename.matrix from $basename.wav. Extract pitch features from the resultant matrix.
  10. : For each segment listed in the .seg file:
  11. :: Dump “$this\rightarrow{beg}\n$this→{end}\n” into a Praat command file at acfeats/$basename.prc. I believe this simply tells praat where each slice begins.
  12. Use getitems2.praat cmdfile wavfile to get slice data. From this extract slice pitch (f0) info:
  13. :: $slicestr .= sprintf(" <begF0> %.2f </begF0>\n", $valbeg);
  14. :: $slicestr .= sprintf(" <endF0> %.2f </endF0>\n", $valend);
  15. :: $slicestr .= sprintf(" <minF0> %.2f </minF0>\n", $valmin);
  16. :: $slicestr .= sprintf(" <maxF0> %.2f </maxF0>\n", $valmax);
  17. :: $slicestr .= sprintf(" <tmaxF0> %.3f </tmaxF0>\n", $tmax);
  18. :: $slicestr .= sprintf(" <tminF0> %.3f </tminF0>\n", $tmin);
  19. : and slice formant (fx) info:
  20. :: $slicestr .= sprintf(" <begF1> %.2f </begF1>\n", $f1beg);
  21. :: $slicestr .= sprintf(" <endF1> %.2f </endF1>\n", $f1end);
  22. :: $slicestr .= sprintf(" <medF1> %.2f </medF1>\n", $f1median);
  23. :: $slicestr .= sprintf(" <begF2> %.2f </begF2>\n", $f2beg);
  24. :: $slicestr .= sprintf(" <endF2> %.2f </endF2>\n", $f2end);
  25. :: $slicestr .= sprintf(" <medF2> %.2f </medF2>\n", $f2median);
  26. :: $slicestr .= sprintf(" <begF3> %.2f </begF3>\n", $f3beg);
  27. :: $slicestr .= sprintf(" <endF3> %.2f </endF3>\n", $f3end);
  28. :: $slicestr .= sprintf(" <medF3> %.2f </medF3>\n", $f3median);
  29. :: $slicestr .= sprintf(" <begF4> %.2f </begF4>\n", $f4beg);
  30. :: $slicestr .= sprintf(" <endF4> %.2f </endF4>\n", $f4end);
  31. :: $slicestr .= sprintf(" <medF4> %.2f </medF4>\n", $f4median);
  32. :: $slicestr .= sprintf(" <begF5> %.2f </begF5>\n", $f5beg);
  33. :: $slicestr .= sprintf(" <endF5> %.2f </endF5>\n", $f5end);
  34. :: $slicestr .= sprintf(" <medF5> %.2f </medF5>\n", $f5median);
  35. : 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 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