/* HTS_PStream_gv_parmgen: function for mlpg using GV */ static void HTS_PStream_gv_parmgen(HTS_PStream * pst, const int m) { int t, i; double step = STEPINIT; double prev = -LZERO; double obj; if (pst->gv_length == 0) return; HTS_PStream_conv_gv(pst, m); if (GV_MAX_ITERATION > 0) { HTS_PStream_calc_wuw_and_wum(pst, m); for (i = 1; i <= GV_MAX_ITERATION; i++) { obj = HTS_PStream_calc_derivative(pst, m); if (obj > prev) step *= STEPDEC; if (obj < prev) step *= STEPINC; for (t = 0; t < pst->length; t++) pst->par[t][m] += step * pst->sm.g[t]; prev = obj; } } }
/* HTS_PStream_mlpg: generate sequence of speech parameter vector maximizing its output probability for given pdf sequence */ static void HTS_PStream_mlpg(HTS_PStream *pst) { int m; for (m = 0; m < pst->static_length; m++) { HTS_PStream_calc_wuw_and_wum(pst, m); HTS_PStream_ldl_factorization(pst); /* LDL factorization */ HTS_PStream_forward_substitution(pst); /* forward substitution */ HTS_PStream_backward_substitution(pst, m); /* backward substitution */ if (pst->gv_buff != NULL) HTS_PStream_gv_parmgen(pst, m); } }