Add online LSTM transducer model (#25)
This commit is contained in:
@@ -1,27 +1,13 @@
|
||||
/**
|
||||
* Copyright (c) 2022 Xiaomi Corporation (authors: Fangjun Kuang)
|
||||
*
|
||||
* See LICENSE for clarification regarding multiple authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// sherpa/csrc/decode.h
|
||||
//
|
||||
// Copyright (c) 2023 Xiaomi Corporation
|
||||
|
||||
#ifndef SHERPA_ONNX_CSRC_DECODE_H_
|
||||
#define SHERPA_ONNX_CSRC_DECODE_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "sherpa-onnx/csrc/rnnt-model.h"
|
||||
#include "sherpa-onnx/csrc/online-transducer-model.h"
|
||||
|
||||
namespace sherpa_onnx {
|
||||
|
||||
@@ -32,8 +18,8 @@ namespace sherpa_onnx {
|
||||
* @param model The RnntModel
|
||||
* @param encoder_out Its shape is (1, num_frames, encoder_out_dim).
|
||||
*/
|
||||
std::vector<int32_t> GreedySearch(RnntModel &model, // NOLINT
|
||||
const Ort::Value &encoder_out);
|
||||
void GreedySearch(OnlineTransducerModel *model, Ort::Value encoder_out,
|
||||
std::vector<int64_t> *hyp);
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
|
||||
|
||||
Reference in New Issue
Block a user