Skip to content

Conversation

csukuangfj
Copy link
Collaborator

No description provided.

@csukuangfj csukuangfj requested a review from Copilot July 12, 2025 04:28
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for the new ten-vad model in the C++ API example and ensures the API functions are properly exported.

  • Export four utility functions via SHERPA_ONNX_API in the public header.
  • Extend vad-cxx-api.cc demo to auto-detect and configure either silero-vad or ten-vad.
  • Update GitHub Actions to run separate tests and artifacts for both VAD models.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
sherpa-onnx/c-api/cxx-api.h Prefix four functions with SHERPA_ONNX_API to export them from the library.
cxx-api-examples/vad-cxx-api.cc Add runtime selection and config for ten-vad alongside silero-vad in the example.
.github/workflows/cxx-api.yaml Split VAD tests into dedicated silero-vad and ten-vad steps; update artifact paths.
Comments suppressed due to low confidence (4)

.github/workflows/cxx-api.yaml:274

  • Using rm -rf to delete WAV files is unnecessary and inconsistent with the silero-vad test (rm -fv *.wav). Consider using rm -fv *.wav to avoid recursive deletion flags on regular files.
          rm -rf *.wav

.github/workflows/cxx-api.yaml:240

  • [nitpick] The silero-vad and ten-vad test steps are almost identical. Consider refactoring into a matrix or a reusable workflow to reduce duplication and simplify future updates.
      - name: Test ten-vad

cxx-api-examples/vad-cxx-api.cc:45

  • [nitpick] This error message could be more actionable by including download instructions or URLs for the required model files.
    fprintf(stderr, "Please provide either silero_vad.onnx or ten-vad.onnx\n");

cxx-api-examples/vad-cxx-api.cc:36

  • [nitpick] The model filenames use different separators (silero_vad.onnx with underscore vs ten-vad.onnx with hyphen). Consider standardizing naming conventions for consistency.
  if (FileExists("./silero_vad.onnx")) {

@csukuangfj csukuangfj merged commit f2df116 into k2-fsa:master Jul 12, 2025
0 of 112 checks passed
@csukuangfj csukuangfj deleted the cxx-api-ten-vad branch July 12, 2025 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant