def METHOD_NAME(vad, inpath):
    audio, sample_rate = read_wave(inpath)
    frames = frame_generator(FS_MS, audio, sample_rate)
    frames = list(frames)
    segments = vad_collector(sample_rate, FS_MS, 300, vad, frames)
    merge_segments = list()
    timestamp_start = 0.0
    timestamp_end = 0.0
    # removing start, end, and long sequences of sils
    for i, segment in enumerate(segments):
        merge_segments.append(segment[0])
        if i and timestamp_start:
            sil_duration = segment[1] - timestamp_end
            if sil_duration > THRESHOLD:
                merge_segments.append(int(THRESHOLD / SCALE) * (b'\x00'))
            else:
                merge_segments.append(int((sil_duration / SCALE)) * (b'\x00'))
        timestamp_start = segment[1]
        timestamp_end = segment[2]
    segment = b''.join(merge_segments)
    return segment, sample_rate