@@ -670,11 +670,12 @@ extern "C" {
670670 float threshold ; // Probability threshold to consider as speech.
671671 int min_speech_duration_ms ; // Min duration for a valid speech segment.
672672 int min_silence_duration_ms ; // Min silence duration to consider speech as ended.
673- float max_speech_duration_s ; // Max duration of a speech segment before forcing a break .
673+ float max_speech_duration_s ; // Max duration of a speech segment before forcing a new segment .
674674 int speech_pad_ms ; // Padding added before and after speech segments.
675675 int window_size_samples ; // Number of audio samples in each probability window.
676676 };
677677 WHISPER_API struct whisper_vad_params whisper_vad_default_params (void );
678+ WHISPER_API struct whisper_vad_params whisper_vad_params_from (struct whisper_full_params wparams );
678679
679680 struct whisper_vad_context_params {
680681 int n_threads ; // The number of threads to use for processing.
@@ -694,13 +695,13 @@ extern "C" {
694695 const struct whisper_vad_context_params params );
695696
696697 struct whisper_vad_speech {
697- int n_probs ;
698+ int n_probs ;
698699 float * probs ;
699700 };
700701
701702 WHISPER_API struct whisper_vad_speech whisper_vad_detect_speech (
702703 struct whisper_vad_context * vctx ,
703- const float * pcmf32 , int n_samples );
704+ const float * samples , int n_samples );
704705
705706 struct whisper_vad_segment {
706707 float start ; // Start time in seconds
@@ -715,17 +716,17 @@ extern "C" {
715716 WHISPER_API struct whisper_vad_timestamps whisper_vad_detect_speech_timestamps (
716717 struct whisper_vad_context * vctx ,
717718 struct whisper_vad_params params ,
718- const float * pcmf32 , int n_samples );
719+ const float * samples , int n_samples );
719720
720721 WHISPER_API struct whisper_vad_timestamps whisper_vad_timestamps_from_probs (
721722 struct whisper_vad_context * vctx ,
722723 struct whisper_vad_params params ,
723724 struct whisper_vad_speech * probs );
724725
725- WHISPER_API void whisper_vad_free (struct whisper_vad_context * ctx );
726- WHISPER_API void whisper_vad_free_state (struct whisper_vad_state * state );
727- WHISPER_API void whisper_vad_free_params (struct whisper_vad_params * params );
728- WHISPER_API void whisper_vad_free_speech (struct whisper_vad_speech * speech );
726+ WHISPER_API void whisper_vad_free (struct whisper_vad_context * ctx );
727+ WHISPER_API void whisper_vad_free_state (struct whisper_vad_state * state );
728+ WHISPER_API void whisper_vad_free_params (struct whisper_vad_params * params );
729+ WHISPER_API void whisper_vad_free_speech (struct whisper_vad_speech * speech );
729730 WHISPER_API void whisper_vad_free_timestamps (struct whisper_vad_timestamps * timestamps );
730731
731732 ////////////////////////////////////////////////////////////////////////////
0 commit comments