Skip to content

Commit

Permalink
handle empty confidence
Browse files Browse the repository at this point in the history
  • Loading branch information
nishchalb committed Oct 9, 2024
1 parent 0b89bb4 commit 47d9669
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/fstalign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,21 +311,18 @@ vector<Stitching> make_stitches(wer_alignment &alignment, vector<RawCtmRecord> h
part.hyptk.start_ts = ts;
part.hyptk.end_ts = endTs;
part.hyptk.duration = endTs - ts;
part.hyptk.confidence = stof(hypNlpPart.confidence);
} else if (!hypNlpPart.ts.empty()) {
float ts = stof(hypNlpPart.ts);

part.hyptk.start_ts = ts;
part.hyptk.end_ts = ts;
part.hyptk.duration = 0.0;
part.hyptk.confidence = stof(hypNlpPart.confidence);
} else if (!hypNlpPart.endTs.empty()) {
float endTs = stof(hypNlpPart.endTs);

part.hyptk.start_ts = endTs;
part.hyptk.end_ts = endTs;
part.hyptk.duration = 0.0;
part.hyptk.confidence = stof(hypNlpPart.confidence);
}
}

Expand Down

0 comments on commit 47d9669

Please sign in to comment.