IS Answering Questions β€” Whisper Medium Basic Classifier + Endpoint VAD

Installation

pip install torch transformers==4.52.4 librosa soundfile silero-vad huggingface_hub

Endpoint VAD

This model was trained with endpoint VAD preprocessing. Apply the same preprocessing during inference.

Parameter Value
Silero threshold 0.60
Minimum valid speech 250 ms
Minimum trailing audio before trimming 3.0 s
Padding after the final endpoint 0.5 s

The endpoint detector only removes a long trailing section after the last valid speech segment. It does not concatenate speech segments or remove internal pauses. If no valid speech is detected, or the trailing section is shorter than 3 seconds, the original audio is retained.

import sys
from pathlib import Path

import librosa
import soundfile as sf
from huggingface_hub import snapshot_download

repo_dir = Path(
    snapshot_download(
        "ntnu-smil/IS-answering-questions-whisper-medium-basic-classifier-endpoint"
    )
)
sys.path.insert(0, str(repo_dir))

from endpoint_vad import SileroEndpointTrimmer

trimmer = SileroEndpointTrimmer(
    threshold=0.60,
    min_speech_duration_ms=250,
    min_trailing_silence_sec=3.0,
    speech_pad_sec=0.5,
)

audio, sample_rate = librosa.load("input.wav", sr=16000, mono=True)
trimmed_audio = trimmer(audio, sample_rate)
sf.write("input_endpoint.wav", trimmed_audio, sample_rate, subtype="PCM_16")

For a response consisting of multiple WAV files, apply the endpoint trimmer independently to each file before passing the files to the grading pipeline.

Downloads last month
35
Safetensors
Model size
264k params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for ntnu-smil/IS-answering-questions-whisper-medium-basic-classifier-endpoint

Finetuned
(969)
this model