Track token scores (#571)
* add export of per-token scores (ys, lm, context) - for best path of the modified-beam-search decoding of transducer * refactoring JSON export of OnlineRecognitionResult, extending pybind11 API of OnlineRecognitionResult * export per-token scores also for greedy-search (online-transducer) - export un-scaled lm_probs (modified-beam search, online-transducer) - polishing * fill lm_probs/context_scores only if LM/ContextGraph is present (make Result smaller)
This commit is contained in:
@@ -37,6 +37,10 @@ OnlineTransducerDecoderResult &OnlineTransducerDecoderResult::operator=(
|
||||
frame_offset = other.frame_offset;
|
||||
timestamps = other.timestamps;
|
||||
|
||||
ys_probs = other.ys_probs;
|
||||
lm_probs = other.lm_probs;
|
||||
context_scores = other.context_scores;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -60,6 +64,10 @@ OnlineTransducerDecoderResult &OnlineTransducerDecoderResult::operator=(
|
||||
frame_offset = other.frame_offset;
|
||||
timestamps = std::move(other.timestamps);
|
||||
|
||||
ys_probs = std::move(other.ys_probs);
|
||||
lm_probs = std::move(other.lm_probs);
|
||||
context_scores = std::move(other.context_scores);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user