diff --git a/.github/workflows/build-debug.yaml b/.github/workflows/build-debug.yaml new file mode 100644 index 0000000..bcacfb7 --- /dev/null +++ b/.github/workflows/build-debug.yaml @@ -0,0 +1,37 @@ +name: CI-debug +on: + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + openEuler-latest-cmake-cann: + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} + defaults: + run: + shell: bash -el {0} + runs-on: ubuntu-24.04-arm + strategy: + matrix: + cann: + - '8.0.rc3.beta1-910b-openeuler22.03-py3.10' + device: + - 'ascend910b3' + build: + - 'Release' + container: ascendai/cann:${{ matrix.cann }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Dependencies + run: | + yum update -y + yum install -y git gcc gcc-c++ make cmake + + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0ce8d97..6d81123 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,8 +5,8 @@ env: ubuntu_image: "ubuntu:22.04" jobs: - ubuntu-latest: - runs-on: ubuntu-latest + ubuntu-22: + runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -27,11 +27,11 @@ jobs: -w /workspace ${{ env.ubuntu_image }} /bin/sh -c ' set -e apt update - apt install -y build-essential git cmake + apt install -y build-essential git cmake libsdl2-dev git config --global --add safe.directory /workspace git config --global --add safe.directory /workspace/sense-voice/csrc/third-party/ggml git submodule sync && git submodule update --init --recursive - cmake . + cmake -DGGML_NATIVE=OFF . make' macOS-latest: @@ -53,8 +53,8 @@ jobs: make - ubuntu-latest-gcc: - runs-on: ubuntu-latest + ubuntu-22-gcc: + runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -76,16 +76,16 @@ jobs: -w /workspace ${{ env.ubuntu_image }} /bin/sh -c ' set -e apt update - apt install -y build-essential cmake git + apt install -y build-essential libsdl2-dev cmake git git config --global --add safe.directory /workspace git config --global --add safe.directory /workspace/sense-voice/csrc/third-party/ggml git submodule sync && git submodule update --init --recursive - cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} + cmake . -DGGML_NATIVE=OFF -DCMAKE_BUILD_TYPE=${{ matrix.build }} make ctest -L gh --output-on-failure' - ubuntu-latest-clang: - runs-on: ubuntu-latest + ubuntu-22-clang: + runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -109,15 +109,15 @@ jobs: -w /workspace ${{ env.ubuntu_image }} /bin/sh -c ' set -e apt update - apt install -y clang build-essential cmake git + apt install -y clang build-essential libsdl2-dev cmake git git config --global --add safe.directory /workspace git config --global --add safe.directory /workspace/sense-voice/csrc/third-party/ggml git submodule sync && git submodule update --init --recursive cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang make' - ubuntu-latest-gcc-sanitized: - runs-on: ubuntu-latest + ubuntu-22-gcc-sanitized: + runs-on: ubuntu-22.04 strategy: fail-fast: false @@ -139,7 +139,7 @@ jobs: -w /workspace ${{ env.ubuntu_image }} /bin/sh -c ' set -e apt update - apt install -y build-essential cmake git + apt install -y build-essential libsdl2-dev cmake git git config --global --add safe.directory /workspace git config --global --add safe.directory /workspace/sense-voice/csrc/third-party/ggml git submodule sync && git submodule update --init --recursive @@ -294,7 +294,7 @@ jobs: shell: msys2 {0} run: | git submodule sync && git submodule update --init --recursive - cmake -B build -DGGML_OPENBLAS=ON + cmake -B build -DGGML_OPENBLAS=ON -DGGML_NATIVE=OFF cmake --build build --config ${{ matrix.build }} -j $(nproc) windows: @@ -486,8 +486,10 @@ jobs: - name: Build run: | + cd $GITHUB_WORKSPACE && ls -al + git submodule sync + git submodule update --init --recursive export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH} - git submodule sync && git submodule update --init --recursive cmake -S . -B build \ -DCMAKE_BUILD_TYPE=${{ matrix.build }} \ -DGGML_CANN=on \ diff --git a/README-EN.md b/README-EN.md index 5f7b135..0e22abf 100644 --- a/README-EN.md +++ b/README-EN.md @@ -115,6 +115,7 @@ sense_voice_full_with_state: decoder audio use 1.011289 s, rtf is 0.182323. ### Streaming Speech Recognition ```bash +sudo apt install libsdl2-dev ./bin/sense-voice-stream -m /path/gguf-fp16-sense-voice-small.bin ``` ## Acknowledgements diff --git a/README.md b/README.md index e881b38..482ae12 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,9 @@ sense_voice_full_with_state: decoder audio use 1.011289 s, rtf is 0.182323. ``` ### 流式语音识别识别 + ```bash +sudo apt install libsdl2-dev ./bin/sense-voice-stream -m /path/gguf-fp16-sense-voice-small.bin ``` diff --git a/sense-voice/csrc/third-party/ggml b/sense-voice/csrc/third-party/ggml index 475e012..5ceeadd 160000 --- a/sense-voice/csrc/third-party/ggml +++ b/sense-voice/csrc/third-party/ggml @@ -1 +1 @@ -Subproject commit 475e01227333a3a29ed0859b477beabcc2de7b5e +Subproject commit 5ceeaddc68cb9f60a80c0ed70750a3cc79fb85e1