Posted to tcl by mjanssen at Fri Aug 29 22:13:53 GMT 2008view raw
- /* dpform.c */
- /* a formant tracker based on LPC polynomial roots and dynamic programming */
- /***/
- /* At each frame, the LPC poles are ordered by increasing frequency. All
- "reasonable" mappings of the poles to F1, F2, ... are performed.
- The cost of "connecting" each of these mappings with each of the mappings
- in the previous frame is computed. The lowest cost connection is then
- chosen as the optimum one. At each frame, each mapping has associated
- with it a cost based on the formant bandwidths and frequencies. This
- "local" cost is finally added to the cost of the best "connection." At
- end of utterance (or after a reasonable delay like .5sec) the best
- mappings for the entire utterance may be found by retracing back through
- best candidate mappings, starting at end of utterance (or current frame).
- */
- /* Here are the major fudge factors for tweaking the formant tracker. */
- #define MAXCAN 300 /* maximum number of candidate mappings allowed */
- static double MISSING = 1, /* equivalent delta-Hz cost for missing formant */
- NOBAND = 1000, /* equivalent bandwidth cost of a missing formant */
- DF_FACT = 20.0, /* cost for proportional frequency changes */
- /* with good "stationarity" function:*/
- /* DF_FACT = 80.0, *//* cost for proportional frequency changes */
- DFN_FACT = 0.3, /* cost for proportional dev. from nominal freqs. */
- BAND_FACT = .002, /* cost per Hz of bandwidth in the poles */
- /* F_BIAS = 0.0004, bias toward selecting low-freq. poles */
- F_BIAS = 0.000, /* bias toward selecting low-freq. poles */
- F_MERGE = 2000.0; /* cost of mapping f1 and f2 to same frequency */