mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-10-05 14:01:22 +02:00
tests : update VAD tests to use Silero V6.2.0 (#3534)
* tests : update VAD tests to use Silero V6.2.0
This commit updates the VAD tests to use the Silero V6.2.0 instead of
V5.1.2. I'm was not sure if we needed to keep testing for both versions,
but opted to just update to the latest version for simplicity.
* wasm : use C++17 for emscripten builds
This commit updates the CMakeLists.txt file to explicitly set the C++
standard to C++17 when building with Emscripten.
The motivation for this change is that building with Emscripten
will currently fail locally and on CI with the following error:
```console
[ 75%] Building CXX object examples/CMakeFiles/common.dir/common-ggml.cpp.o
In file included from /home/danbev/work/ai/whisper.cpp/examples/stream.wasm/emscripten.cpp:5:
/home/danbev/work/utils/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/bind.h:11:2: error:
"embind requires -std=c++17 or newer"
11 | #error "embind requires -std=c++17 or newer"
| ^
In file included from /home/danbev/work/ai/whisper.cpp/examples/whisper.wasm/emscripten.cpp:4:
/home/danbev/work/utils/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/bind.h:11:2: error:
"embind requires -std=c++17 or newer"
11 | #error "embind requires -std=c++17 or newer"
| ^
```
This commit is contained in:
@@ -42,11 +42,13 @@ int main() {
|
||||
const int n_segments = whisper_full_n_segments(wctx);
|
||||
assert(n_segments == 1);
|
||||
|
||||
|
||||
printf("Segment text:\n%s", whisper_full_get_segment_text(wctx, 0));
|
||||
assert(strcmp(" And so my fellow Americans, ask not what your country can do for you,"
|
||||
" ask what you can do for your country.",
|
||||
whisper_full_get_segment_text(wctx, 0)) == 0);
|
||||
assert(whisper_full_get_segment_t0(wctx, 0) == 29);
|
||||
assert(whisper_full_get_segment_t1(wctx, 0) == 1049);
|
||||
assert(whisper_full_get_segment_t0(wctx, 0) == 32);
|
||||
assert(whisper_full_get_segment_t1(wctx, 0) == 1051);
|
||||
|
||||
whisper_free(wctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user