VGGishBundle¶
- class torchaudio.prototype.pipelines.VGGishBundle[source]¶
VGGish [Hershey et al., 2017] inference pipeline ported from torchvggish and tensorflow-models.
Example
>>> import torchaudio >>> from torchaudio.prototype.pipelines import VGGISH >>> >>> input_sr = VGGISH.sample_rate >>> input_proc = VGGISH.get_input_processor() >>> model = VGGISH.get_model() >>> >>> waveform, sr = torchaudio.load( >>> "Chopin_Ballade_-1_In_G_Minor,_Op._23.mp3", >>> ) >>> waveform = waveform.squeeze(0) >>> waveform = torchaudio.functional.resample(waveform, sr, input_sr) >>> mono_output = model(input_proc(waveform))
Properties¶
sample_rate¶
Methods¶
get_input_processor¶
- VGGishBundle.get_input_processor() VGGishInputProcessor [source]¶
Constructs input processor for VGGish.
- Returns:
input processor for VGGish.
- Return type: