Add RNN LM rescore for offline ASR with modified_beam_search (#125)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "onnxruntime_cxx_api.h" // NOLINT
|
||||
#include "sherpa-onnx/csrc/hypothesis.h"
|
||||
#include "sherpa-onnx/csrc/offline-model-config.h"
|
||||
|
||||
namespace sherpa_onnx {
|
||||
@@ -79,13 +80,16 @@ class OfflineTransducerModel {
|
||||
*
|
||||
* @param results Current decoded results.
|
||||
* @param end_index We only use results[0:end_index] to build
|
||||
* the decoder_input.
|
||||
* the decoder_input. results[end_index] is not used.
|
||||
* @return Return a tensor of shape (results.size(), ContextSize())
|
||||
*/
|
||||
Ort::Value BuildDecoderInput(
|
||||
const std::vector<OfflineTransducerDecoderResult> &results,
|
||||
int32_t end_index) const;
|
||||
|
||||
Ort::Value BuildDecoderInput(const std::vector<Hypothesis> &results,
|
||||
int32_t end_index) const;
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> impl_;
|
||||
|
||||
Reference in New Issue
Block a user