Add ffmpeg example (#61)

This commit is contained in:
Fangjun Kuang
2023-02-24 17:44:36 +08:00
committed by GitHub
parent c63c4c3389
commit ce4dd176e4
13 changed files with 632 additions and 3 deletions

View File

@@ -10,6 +10,9 @@ on:
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-onnx/csrc/*'
- 'sherpa-onnx/c-api/*'
- 'ffmpeg-examples/**'
- 'c-api-examples/**'
pull_request:
branches:
- master
@@ -19,6 +22,8 @@ on:
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-onnx/csrc/*'
- 'sherpa-onnx/c-api/*'
- 'ffmpeg-examples/**'
concurrency:
group: linux-${{ github.ref }}
@@ -40,6 +45,23 @@ jobs:
with:
fetch-depth: 0
- name: Install ffmpeg
shell: bash
run: |
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:savoury1/ffmpeg4
sudo add-apt-repository ppa:savoury1/ffmpeg5
sudo apt-get install -y libavdevice-dev libavutil-dev ffmpeg
pkg-config --modversion libavutil
ffmpeg -version
- name: Show ffmpeg version
shell: bash
run: |
pkg-config --modversion libavutil
ffmpeg -version
- name: Configure CMake
shell: bash
run: |
@@ -56,12 +78,22 @@ jobs:
ls -lh lib
ls -lh bin
cd ../ffmpeg-examples
make
- name: Display dependencies of sherpa-onnx for linux
shell: bash
run: |
file build/bin/sherpa-onnx
readelf -d build/bin/sherpa-onnx
- name: Test sherpa-onnx-ffmpeg
run: |
export PATH=$PWD/ffmpeg-examples:$PATH
export EXE=sherpa-onnx-ffmpeg
.github/scripts/test-online-transducer.sh
- name: Test online transducer
shell: bash
run: |