Add C API for offline TTS. (#373)
This commit is contained in:
12
.github/workflows/linux-gpu.yaml
vendored
12
.github/workflows/linux-gpu.yaml
vendored
@@ -12,6 +12,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -26,6 +27,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -48,7 +50,7 @@ jobs:
|
||||
build_type: [Release, Debug]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -75,6 +77,14 @@ jobs:
|
||||
file build/bin/sherpa-onnx
|
||||
readelf -d build/bin/sherpa-onnx
|
||||
|
||||
- name: Test offline TTS
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin:$PATH
|
||||
export EXE=sherpa-onnx-offline-tts
|
||||
|
||||
.github/scripts/test-offline-tts.sh
|
||||
|
||||
- name: Test online paraformer
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
17
.github/workflows/linux.yaml
vendored
17
.github/workflows/linux.yaml
vendored
@@ -12,6 +12,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -26,6 +27,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -49,7 +51,7 @@ jobs:
|
||||
shared_lib: [ON, OFF]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -76,6 +78,14 @@ jobs:
|
||||
file build/bin/sherpa-onnx
|
||||
readelf -d build/bin/sherpa-onnx
|
||||
|
||||
- name: Test offline TTS
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin:$PATH
|
||||
export EXE=sherpa-onnx-offline-tts
|
||||
|
||||
.github/scripts/test-offline-tts.sh
|
||||
|
||||
- name: Test online paraformer
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -150,3 +160,8 @@ jobs:
|
||||
file_glob: true
|
||||
overwrite: true
|
||||
file: sherpa-onnx-*linux-x64.tar.bz2
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tts-generated-test-files
|
||||
path: tts
|
||||
|
||||
12
.github/workflows/macos.yaml
vendored
12
.github/workflows/macos.yaml
vendored
@@ -12,6 +12,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -24,6 +25,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -44,7 +46,7 @@ jobs:
|
||||
build_type: [Release, Debug]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -74,6 +76,14 @@ jobs:
|
||||
otool -L build/bin/sherpa-onnx
|
||||
otool -l build/bin/sherpa-onnx
|
||||
|
||||
- name: Test offline TTS
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin:$PATH
|
||||
export EXE=sherpa-onnx-offline-tts
|
||||
|
||||
.github/scripts/test-offline-tts.sh
|
||||
|
||||
- name: Test online paraformer
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
18
.github/workflows/pkg-config.yaml
vendored
18
.github/workflows/pkg-config.yaml
vendored
@@ -9,6 +9,7 @@ on:
|
||||
- '*'
|
||||
paths:
|
||||
- '.github/workflows/pkg-config.yaml'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -19,6 +20,7 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/pkg-config.yaml'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -92,9 +94,20 @@ jobs:
|
||||
run: |
|
||||
export PKG_CONFIG_PATH=$PWD/build/install:$PKG_CONFIG_PATH
|
||||
cd c-api-examples
|
||||
|
||||
gcc -o decode-file-c-api $(pkg-config --cflags sherpa-onnx) ./decode-file-c-api.c $(pkg-config --libs sherpa-onnx)
|
||||
./decode-file-c-api --help
|
||||
|
||||
gcc -o offline-tts-c-api $(pkg-config --cflags sherpa-onnx) ./offline-tts-c-api.c $(pkg-config --libs sherpa-onnx)
|
||||
./offline-tts-c-api --help
|
||||
|
||||
- name: Test offline TTS C API
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/c-api-examples:$PATH
|
||||
export EXE=offline-tts-c-api
|
||||
.github/scripts/test-offline-tts.sh
|
||||
|
||||
- name: Test online transducer (C API)
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -102,3 +115,8 @@ jobs:
|
||||
export EXE=decode-file-c-api
|
||||
|
||||
.github/scripts/test-online-transducer.sh
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tts-generated-test-files
|
||||
path: tts
|
||||
|
||||
10
.github/workflows/windows-x64-cuda.yaml
vendored
10
.github/workflows/windows-x64-cuda.yaml
vendored
@@ -12,6 +12,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -24,6 +25,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -64,6 +66,14 @@ jobs:
|
||||
|
||||
ls -lh ./bin/Release/sherpa-onnx.exe
|
||||
|
||||
- name: Test offline TTS
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin/Release:$PATH
|
||||
export EXE=sherpa-onnx-offline-tts.exe
|
||||
|
||||
.github/scripts/test-offline-tts.sh
|
||||
|
||||
- name: Test online paraformer for windows x64
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
12
.github/workflows/windows-x64.yaml
vendored
12
.github/workflows/windows-x64.yaml
vendored
@@ -12,6 +12,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -24,6 +25,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -45,7 +47,7 @@ jobs:
|
||||
shared_lib: [ON, OFF]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -65,6 +67,14 @@ jobs:
|
||||
|
||||
ls -lh ./bin/Release/sherpa-onnx.exe
|
||||
|
||||
- name: Test offline TTS
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin/Release:$PATH
|
||||
export EXE=sherpa-onnx-offline-tts.exe
|
||||
|
||||
.github/scripts/test-offline-tts.sh
|
||||
|
||||
- name: Test online paraformer for windows x64
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
12
.github/workflows/windows-x86.yaml
vendored
12
.github/workflows/windows-x86.yaml
vendored
@@ -12,6 +12,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -24,6 +25,7 @@ on:
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
- '.github/scripts/test-offline-tts.sh'
|
||||
- 'CMakeLists.txt'
|
||||
- 'cmake/**'
|
||||
- 'sherpa-onnx/csrc/*'
|
||||
@@ -45,7 +47,7 @@ jobs:
|
||||
shared_lib: [ON, OFF]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -65,6 +67,14 @@ jobs:
|
||||
|
||||
ls -lh ./bin/Release/sherpa-onnx.exe
|
||||
|
||||
- name: Test offline TTS
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin/Release:$PATH
|
||||
export EXE=sherpa-onnx-offline-tts.exe
|
||||
|
||||
.github/scripts/test-offline-tts.sh
|
||||
|
||||
- name: Test online paraformer for windows x86
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user