Skip to content

Commit

Permalink
disable paraformer test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Aug 12, 2024
1 parent 4fee919 commit 9c07940
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 34 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/pascal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- pascal-api-streaming-asr
paths:
- '.github/workflows/pascal.yaml'
- 'CMakeLists.txt'
Expand Down Expand Up @@ -71,13 +70,6 @@ jobs:
shell: bash
run: |
choco install lazarus
ls -lh /c/lazarus/
echo '--'
ls -lh /c/lazarus/fpc/
echo '--'
ls -lh /c/lazarus/fpc/*
echo '--'
ls -lh /c/lazarus/fpc/*/*
ls -lh /c/lazarus/fpc/3.2.2/bin/x86_64-win64/
Expand Down Expand Up @@ -146,24 +138,25 @@ jobs:
run: |
export PATH=/c/lazarus/fpc/3.2.2/bin/x86_64-win64:$PATH
cd ./pascal-api-examples
pushd streaming-asr
./run-zipformer-transducer.sh
rm -rf sherpa-onnx-*
echo "---"
./run-paraformer.sh
rm -rf sherpa-onnx-*
echo "---"
if [[ ${{ matrix.os }} != 'windows-latest' ]]; then
./run-paraformer.sh
rm -rf sherpa-onnx-*
echo "---"
./run-zipformer-ctc.sh
echo "---"
./run-zipformer-ctc.sh
echo "---"
./run-zipformer-ctc-hlg.sh
rm -rf sherpa-onnx-*
echo "---"
./run-zipformer-ctc-hlg.sh
rm -rf sherpa-onnx-*
echo "---"
fi
ls -lh
popd
2 changes: 1 addition & 1 deletion java-api-examples/StreamingDecodeFileCtcHLG.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void main(String[] args) {
.build();

OnlineCtcFstDecoderConfig ctcFstDecoderConfig =
OnlineCtcFstDecoderConfig.builder().setGraph("hlg").build();
OnlineCtcFstDecoderConfig.builder().setGraph(hlg).build();

OnlineRecognizerConfig config =
OnlineRecognizerConfig.builder()
Expand Down
8 changes: 4 additions & 4 deletions pascal-api-examples/streaming-asr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APIs with streaming models for speech recognition.

|File|Description|
|----|-----------|
|./run-paraformer.sh|Use a streaming Paraformer model for speech recognition|
|./run-zipformer-ctc-hlg.sh|Use a streaming Zipformer CTC model for speech recognition|
|./run-zipformer-ctc.sh|Use a streaming Zipformer CTC model with HLG for speech recognition|
|./run-zipformer-transducer.sh|Use a Zipformer transducer model for speech recognition|
|[run-paraformer.sh](./run-paraformer.sh)|Use a streaming Paraformer model for speech recognition|
|[run-zipformer-ctc-hlg.sh](./run-zipformer-ctc-hlg.sh)|Use a streaming Zipformer CTC model for speech recognition|
|[run-zipformer-ctc.sh](./run-zipformer-ctc.sh)|Use a streaming Zipformer CTC model with HLG for speech recognition|
|[run-zipformer-transducer.sh](./run-zipformer-transducer.sh)|Use a Zipformer transducer model for speech recognition|
5 changes: 2 additions & 3 deletions pascal-api-examples/streaming-asr/paraformer.pas
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{ Copyright (c) 2024 Xiaomi Corporation }

{
This file shows how to use a streaming Paaraformer model to decode files.
This file shows how to use a streaming Paraformer model to decode files.
You can download the model files from
https://github.com/k2-fsa/sherpa-onnx/releases/tag/asr-models
}

program paraformer;

{$mode delphi}
{$mode objfpc}

uses
sherpa_onnx,
Expand Down Expand Up @@ -54,7 +54,6 @@

Stream := Recognizer.CreateStream();


Stream.AcceptWaveform(Wave.Samples, Wave.SampleRate);

SetLength(TailPaddings, Round(Wave.SampleRate * 0.5)); {0.5 seconds of padding}
Expand Down
4 changes: 1 addition & 3 deletions pascal-api-examples/streaming-asr/zipformer_ctc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@

program zipformer_ctc;

{$mode delphi}
{$mode objfpc}

uses
sherpa_onnx,
DateUtils,
SysUtils;


var
Config: TSherpaOnnxOnlineRecognizerConfig;
Recognizer: TSherpaOnnxOnlineRecognizer;
Expand Down Expand Up @@ -54,7 +53,6 @@

Stream := Recognizer.CreateStream();


Stream.AcceptWaveform(Wave.Samples, Wave.SampleRate);

SetLength(TailPaddings, Round(Wave.SampleRate * 0.5)); {0.5 seconds of padding}
Expand Down
4 changes: 1 addition & 3 deletions pascal-api-examples/streaming-asr/zipformer_ctc_hlg.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@

program zipformer_ctc_hlg;

{$mode delphi}
{$mode objfpc}

uses
sherpa_onnx,
DateUtils,
SysUtils;


var
Config: TSherpaOnnxOnlineRecognizerConfig;
Recognizer: TSherpaOnnxOnlineRecognizer;
Expand Down Expand Up @@ -55,7 +54,6 @@

Stream := Recognizer.CreateStream();


Stream.AcceptWaveform(Wave.Samples, Wave.SampleRate);

SetLength(TailPaddings, Round(Wave.SampleRate * 0.5)); {0.5 seconds of padding}
Expand Down
4 changes: 1 addition & 3 deletions pascal-api-examples/streaming-asr/zipformer_transducer.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@

program zipformer_transducer;

{$mode delphi}
{$mode objfpc}

uses
sherpa_onnx,
DateUtils,
SysUtils;


var
Config: TSherpaOnnxOnlineRecognizerConfig;
Recognizer: TSherpaOnnxOnlineRecognizer;
Expand Down Expand Up @@ -56,7 +55,6 @@

Stream := Recognizer.CreateStream();


Stream.AcceptWaveform(Wave.Samples, Wave.SampleRate);

SetLength(TailPaddings, Round(Wave.SampleRate * 0.5)); {0.5 seconds of padding}
Expand Down

0 comments on commit 9c07940

Please sign in to comment.