mirror of
https://github.com/pyannote/pyannote-audio.git
synced 2026-11-20 13:07:51 +09:00
2.0 KiB
2.0 KiB
In [ ]:
from pyannote.database import get_protocol, FileFinder
protocol = get_protocol('Debug.SpeakerDiarization.Debug',
preprocessors={"audio": FileFinder()})In [ ]:
from pyannote.audio.tasks import VoiceActivityDetection
from pyannote.audio.models.segmentation.debug import SimpleSegmentationModel
import pytorch_lightning as plIn [ ]:
vad = VoiceActivityDetection(protocol, duration=2., batch_size=16, num_workers=4)
model = SimpleSegmentationModel(task=vad)
trainer = pl.Trainer(max_epochs=1)
_ = trainer.fit(model)In [ ]:
summary = model.summarize('full')In [ ]:
model.freeze_up_to('lstm')In [ ]:
model.unfreeze_up_to('mfcc.MelSpectrogram.spectrogram')In [ ]:
model.freeze_by_name(['lstm', 'activation'])