Skip to content

Commit

Permalink
delete note according to pkufool
Browse files Browse the repository at this point in the history
  • Loading branch information
HalFTeen committed Aug 29, 2023
1 parent dcf9c36 commit 5874ba7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions sherpa-ncnn/csrc/recognizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ class Recognizer::Impl {
return stream;
}

// std::unique_ptr<Stream> CreateStream(const std::vector<std::vector<int32_t>>& contexts) const {
std::unique_ptr<Stream> CreateStream(const char* contexts) const {
std::vector<std::vector<int32_t>> hotwords;
std::vector<int32_t> tmp;
Expand Down Expand Up @@ -194,7 +193,6 @@ class Recognizer::Impl {
ncnn::Mat encoder_out;
std::tie(encoder_out, states) = model_->RunEncoder(features, states);

// decoder_->Decode(encoder_out, &s->GetResult());
if (has_context_graph) {
decoder_->Decode(encoder_out, s, &s->GetResult());
} else {
Expand Down Expand Up @@ -273,10 +271,6 @@ std::unique_ptr<Stream> Recognizer::CreateStream() const {
return impl_->CreateStream();
}

//std::unique_ptr<Stream> Recognizer::CreateStream(
// const std::vector<std::vector<int32_t>> &context_list) const {
// return impl_->CreateStream(context_list);
//}
std::unique_ptr<Stream> Recognizer::CreateStream(
const char* context_list) const {
return impl_->CreateStream(context_list);
Expand Down
3 changes: 1 addition & 2 deletions sherpa-ncnn/csrc/recognizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ class Recognizer {

// Create a stream with context phrases
std::unique_ptr<Stream> CreateStream(const char* context_list) const;
//std::unique_ptr<Stream> CreateStream(
// const std::vector<std::vector<int32_t>> &context_list) const;

/**
* Return true if the given stream has enough frames for decoding.
* Return false otherwise
Expand Down

0 comments on commit 5874ba7

Please sign in to comment.