Views
No views yet
Nianlong Gu, Kanghwi Lee, Maris Basha, Sumit Kumar Ram, Guanghao You, Richard H. R. Hahnloser
University of Zurich and ETH Zurich
1git clone https://github.com/nianlonggu/WhisperSeg.git
2cd WhisperSeg; pip install -r requirements.txt1from model import WhisperSegmenter
2import librosa
3import json
4segmenter = WhisperSegmenter( "nccratliri/whisperseg-large-ms", device="cuda" )
5
6sr = 32000
7spec_time_step = 0.0025
8
9audio, _ = librosa.load( "data/example_subset/Zebra_finch/test_adults/zebra_finch_g17y2U-f00007.wav",
10 sr = sr )
11## Note if spec_time_step is not provided, a default value will be used by the model.
12prediction = segmenter.segment( audio, sr = sr, spec_time_step = spec_time_step )
13print(prediction)1from audio_utils import SpecViewer
2spec_viewer = SpecViewer()
3spec_viewer.visualize( audio = audio, sr = sr, min_frequency= 0, prediction = prediction,
4 window_size=8, precision_bits=1
5 )
@INPROCEEDINGS{10447620,
author={Gu, Nianlong and Lee, Kanghwi and Basha, Maris and Kumar Ram, Sumit and You, Guanghao and Hahnloser, Richard H. R.},
booktitle={ICASSP 2024 - 2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
title={Positive Transfer of the Whisper Speech Transformer to Human and Animal Voice Activity Detection},
year={2024},
volume={},
number={},
pages={7505-7509},
keywords={Voice activity detection;Adaptation models;Animals;Transformers;Acoustics;Human voice;Spectrogram;Voice activity detection;audio segmentation;Transformer;Whisper},
doi={10.1109/ICASSP48485.2024.10447620}}