Inverse text normalization API for other programming languages (#1019)

This commit is contained in:
Fangjun Kuang
2024-06-17 17:02:39 +08:00
committed by GitHub
parent b0f7ed3ee3
commit 6e09933d99
39 changed files with 669 additions and 104 deletions

View File

@@ -190,6 +190,8 @@ jobs:
shell: bash
run: |
cd ./java-api-examples
./run-inverse-text-normalization-paraformer.sh
./run-non-streaming-decode-file-paraformer.sh
rm -rf sherpa-onnx-paraformer-zh-*

View File

@@ -39,7 +39,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
python-version: ["3.8"]
steps:
@@ -72,45 +72,18 @@ jobs:
cmake --build . --target install --config Release
- name: Build sherpa-onnx for windows x86
if: matrix.os == 'windows-latest'
shell: bash
run: |
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --version
mkdir build-win32
cd build-win32
cmake \
-A Win32 \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=./install \
-DCMAKE_BUILD_TYPE=Release \
-DSHERPA_ONNX_ENABLE_WEBSOCKET=OFF \
-DBUILD_ESPEAK_NG_EXE=OFF \
-DSHERPA_ONNX_ENABLE_BINARY=ON \
..
cmake --build . --target install --config Release
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: ./build/install/lib/
- uses: actions/upload-artifact@v4
if: matrix.os == 'windows-latest'
with:
name: ${{ matrix.os }}-win32
path: ./build-win32/install/lib/
test-dot-net:
runs-on: ${{ matrix.os }}
needs: [build-libs]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest] #, windows-latest]
os: [ubuntu-latest]
python-version: ["3.8"]
steps:
@@ -134,30 +107,11 @@ jobs:
name: ubuntu-latest
path: /tmp/linux
- name: Retrieve artifact from macos-latest
uses: actions/download-artifact@v4
with:
name: macos-latest
path: /tmp/macos
- name: Retrieve artifact from windows-latest
uses: actions/download-artifact@v4
with:
name: windows-latest
path: /tmp/windows-x64
- name: Retrieve artifact from windows-latest
uses: actions/download-artifact@v4
with:
name: windows-latest-win32
path: /tmp/windows-x86
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
- name: Check dotnet
run: dotnet --info
@@ -171,15 +125,6 @@ jobs:
echo "----------/tmp/linux----------"
ls -lh /tmp/linux
echo "----------/tmp/macos----------"
ls -lh /tmp/macos
echo "----------/tmp/windows-x64----------"
ls -lh /tmp/windows-x64
echo "----------/tmp/windows-x86----------"
ls -lh /tmp/windows-x86
- name: Build
shell: bash
run: |

View File

@@ -127,7 +127,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: tts-waves
name: tts-waves-${{ matrix.os }}
path: tts-waves
- name: Test non-streaming decoding files (macOS)
@@ -154,6 +154,7 @@ jobs:
echo "Test paraformer"
./run-paraformer.sh
./run-paraformer-itn.sh
rm -rf sherpa-onnx-paraformer-zh-2023-03-28
echo "Test NeMo CTC"

View File

@@ -39,8 +39,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11, macos-14, ubuntu-20.04, ubuntu-22.04] #, windows-latest]
node-version: ["16", "17", "18", "19", "21", "22"]
os: [macos-latest, ubuntu-latest, ubuntu-latest]
node-version: ["16", "22"]
python-version: ["3.8"]
steps: