From 35fb832da2cd9232c8bc3452272430390391f303 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sat, 23 Mar 2024 16:18:25 +0800 Subject: [PATCH] more fixes --- dotnet-examples/offline-decode-files/run-hotwords.sh | 2 +- dotnet-examples/offline-decode-files/run-zipformer.sh | 2 +- dotnet-examples/online-decode-files/run-transducer.sh | 2 +- scripts/dotnet/online.cs | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dotnet-examples/offline-decode-files/run-hotwords.sh b/dotnet-examples/offline-decode-files/run-hotwords.sh index bfa1dfc06..de17344f0 100755 --- a/dotnet-examples/offline-decode-files/run-hotwords.sh +++ b/dotnet-examples/offline-decode-files/run-hotwords.sh @@ -3,7 +3,7 @@ set -ex if [ ! -d ./sherpa-onnx-zipformer-en-2023-04-01 ]; then - wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-04-01.tar.bz2 + wget -q https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-04-01.tar.bz2 tar xvf sherpa-onnx-zipformer-en-2023-04-01.tar.bz2 rm sherpa-onnx-zipformer-en-2023-04-01.tar.bz2 fi diff --git a/dotnet-examples/offline-decode-files/run-zipformer.sh b/dotnet-examples/offline-decode-files/run-zipformer.sh index 6844307d3..4c69067a7 100755 --- a/dotnet-examples/offline-decode-files/run-zipformer.sh +++ b/dotnet-examples/offline-decode-files/run-zipformer.sh @@ -3,7 +3,7 @@ set -ex if [ ! -d ./sherpa-onnx-zipformer-en-2023-04-01 ]; then - wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-04-01.tar.bz2 + wget -q https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-04-01.tar.bz2 tar xvf sherpa-onnx-zipformer-en-2023-04-01.tar.bz2 rm sherpa-onnx-zipformer-en-2023-04-01.tar.bz2 fi diff --git a/dotnet-examples/online-decode-files/run-transducer.sh b/dotnet-examples/online-decode-files/run-transducer.sh index f8170d8d7..ad98af13a 100755 --- a/dotnet-examples/online-decode-files/run-transducer.sh +++ b/dotnet-examples/online-decode-files/run-transducer.sh @@ -6,7 +6,7 @@ set -ex if [ ! -d ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20 ]; then - wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2 + wget -q https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2 tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2 fi diff --git a/scripts/dotnet/online.cs b/scripts/dotnet/online.cs index d07a6c64a..09b827ad1 100644 --- a/scripts/dotnet/online.cs +++ b/scripts/dotnet/online.cs @@ -236,6 +236,10 @@ public OnlineRecognizerResult(IntPtr handle) } } } + else + { + _timestamps = Array.Empty(); + } } }