Add Swift example for generating subtitles (#318)

This commit is contained in:
Fangjun Kuang
2023-09-18 15:16:54 +08:00
committed by GitHub
parent 2d51ca49b7
commit 692a47dd80
9 changed files with 654 additions and 11 deletions

View File

@@ -18,9 +18,9 @@ void Hypotheses::Add(Hypothesis hyp) {
} else {
it->second.log_prob = LogAdd<double>()(it->second.log_prob, hyp.log_prob);
if (it->second.lm_log_prob != 0 && hyp.lm_log_prob != 0){
if (it->second.lm_log_prob != 0 && hyp.lm_log_prob != 0) {
it->second.lm_log_prob =
LogAdd<double>()(it->second.lm_log_prob, hyp.lm_log_prob);
LogAdd<double>()(it->second.lm_log_prob, hyp.lm_log_prob);
}
}
}