Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Oct 24, 2024
1 parent 50a7b35 commit 36a7153
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/node-addon-api/src/non-streaming-asr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static Napi::External<SherpaOnnxOfflineStream> CreateOfflineStreamWrapper(
SherpaOnnxCreateOfflineStream(recognizer);

return Napi::External<SherpaOnnxOfflineStream>::New(
env, const_cast<SherpaOnnxOfflineStream>(stream),
env, const_cast<SherpaOnnxOfflineStream *>(stream),
[](Napi::Env env, SherpaOnnxOfflineStream *stream) {
SherpaOnnxDestroyOfflineStream(stream);
});
Expand Down
6 changes: 4 additions & 2 deletions scripts/node-addon-api/src/streaming-asr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,12 @@ static Napi::External<SherpaOnnxOnlineStream> CreateOnlineStreamWrapper(
SherpaOnnxOnlineRecognizer *recognizer =
info[0].As<Napi::External<SherpaOnnxOnlineRecognizer>>().Data();

SherpaOnnxOnlineStream *stream = SherpaOnnxCreateOnlineStream(recognizer);
const SherpaOnnxOnlineStream *stream =
SherpaOnnxCreateOnlineStream(recognizer);

return Napi::External<SherpaOnnxOnlineStream>::New(
env, stream, [](Napi::Env env, SherpaOnnxOnlineStream *stream) {
env, const_cast<SherpaOnnxOnlineStream *>(stream),
[](Napi::Env env, SherpaOnnxOnlineStream *stream) {
SherpaOnnxDestroyOnlineStream(stream);
});
}
Expand Down
2 changes: 2 additions & 0 deletions sherpa-onnx/c-api/cxx-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ class SHERPA_ONNX_API MoveOnly {
Destroy();

p_ = other.Release();

return *this;
}

const T *Get() const { return p_; }
Expand Down

0 comments on commit 36a7153

Please sign in to comment.