This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex_bi_series-sherpa-onnx/sherpa-onnx/csrc/decode.h

27 lines
620 B
C
Raw Normal View History

2023-02-18 21:35:15 +08:00
// sherpa/csrc/decode.h
//
// Copyright (c) 2023 Xiaomi Corporation
2022-09-23 09:22:06 +03:00
#ifndef SHERPA_ONNX_CSRC_DECODE_H_
#define SHERPA_ONNX_CSRC_DECODE_H_
2022-09-23 09:22:06 +03:00
#include <vector>
2022-09-23 09:22:06 +03:00
2023-02-18 21:35:15 +08:00
#include "sherpa-onnx/csrc/online-transducer-model.h"
2022-09-23 09:22:06 +03:00
namespace sherpa_onnx {
2022-09-23 09:22:06 +03:00
/** Greedy search for non-streaming ASR.
*
* @TODO(fangjun) Support batch size > 1
*
* @param model The RnntModel
* @param encoder_out Its shape is (1, num_frames, encoder_out_dim).
*/
2023-02-18 21:35:15 +08:00
void GreedySearch(OnlineTransducerModel *model, Ort::Value encoder_out,
std::vector<int64_t> *hyp);
2022-09-23 09:22:06 +03:00
} // namespace sherpa_onnx
2022-09-23 09:22:06 +03:00
#endif // SHERPA_ONNX_CSRC_DECODE_H_