Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kaldi-commonvoice
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Will
kaldi-commonvoice
Commits
e8d12870
Commit
e8d12870
authored
Jan 18, 2019
by
Karel Vesely
Committed by
Daniel Povey
Jan 18, 2019
Browse files
Options
Downloads
Patches
Plain Diff
[src] Fix 'sausage-time' issue which occurs with disabled MBR decoding. (#2996)
parent
fd0aca9d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lat/sausages.cc
+17
-3
17 additions, 3 deletions
src/lat/sausages.cc
with
17 additions
and
3 deletions
src/lat/sausages.cc
+
17
−
3
View file @
e8d12870
...
...
@@ -53,7 +53,17 @@ void MinimumBayesRisk::MbrDecode() {
}
// build the outputs (time, confidences),
if
(
R_
[
q
]
!=
0
||
opts_
.
print_silence
)
{
one_best_times_
.
push_back
(
times_
[
q
][
0
]);
// see which 'item' from the sausage-bin should we select,
// (not necessarily the 1st one when MBR decoding disabled)
int32
s
=
0
;
for
(
int32
j
=
0
;
j
<
gamma_
[
q
].
size
();
j
++
)
{
if
(
gamma_
[
q
][
j
].
first
==
R_
[
q
])
{
s
=
j
;
break
;
}
}
one_best_times_
.
push_back
(
times_
[
q
][
s
]);
// post-process the times,
size_t
i
=
one_best_times_
.
size
();
if
(
i
>
1
&&
one_best_times_
[
i
-
2
].
second
>
one_best_times_
[
i
-
1
].
first
)
{
// It's quite possible for this to happen, but it seems like it would
...
...
@@ -76,8 +86,12 @@ void MinimumBayesRisk::MbrDecode() {
one_best_times_
[
i
-
1
].
second
=
right
;
}
BaseFloat
confidence
=
0.0
;
for
(
int32
j
=
0
;
j
<
gamma_
[
q
].
size
();
j
++
)
if
(
gamma_
[
q
][
j
].
first
==
R_
[
q
])
confidence
=
gamma_
[
q
][
j
].
second
;
for
(
int32
j
=
0
;
j
<
gamma_
[
q
].
size
();
j
++
)
{
if
(
gamma_
[
q
][
j
].
first
==
R_
[
q
])
{
confidence
=
gamma_
[
q
][
j
].
second
;
break
;
}
}
one_best_confidences_
.
push_back
(
confidence
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment