diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9dc92ea..76278da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -235,3 +235,33 @@ jobs: with: name: whisper-blas-bin-${{ matrix.arch }} path: build/bin/${{ matrix.build }} + + emscripten: + runs-on: ubuntu-latest + + strategy: + matrix: + build: [Release] + + steps: + - name: Clone + uses: actions/checkout@v1 + + - name: Dependencies + run: | + wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz + tar -xvf master.tar.gz + emsdk-master/emsdk update + emsdk-master/emsdk install latest + emsdk-master/emsdk activate latest + + - name: Configure + run: echo "tmp" + + - name: Build + run: | + pushd emsdk-master + source ./emsdk_env.sh + popd + emcmake cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} + make diff --git a/examples/main/main.cpp b/examples/main/main.cpp index ef903aa..d387a77 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -199,7 +199,6 @@ void whisper_print_segment_callback(struct whisper_context * ctx, int n_new, voi } if (params.diarize && pcmf32s.size() == 2) { - const int64_t n_samples = pcmf32s[0].size(); const int64_t is0 = timestamp_to_sample(t0, n_samples);