This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from pyannote.audio import Pipeline | |
| import torch | |
| from pydub import AudioSegment | |
| import librosa | |
| def save_audio_segments(audio_file, min_speakers, max_speakers, output_dir): | |
| pipeline = Pipeline.from_pretrained( | |
| "pyannote/speaker-diarization@2.1", | |
| use_auth_token='YOUR HUG FACE TOKEN') |
NewerOlder