Luxios22 / simple_diarizer

Simplified diarization pipeline using some pretrained models - audio file to diarized segments in a few lines of code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple_diarizer

Simplified diarization pipeline using some pretrained models.

Install

Simplified diarization is available on PyPI:

pip install simple-diarizer

Usage

Made to be a simple as possible to go from an input audio file to diarized segments.

import soundfile as sf
import matplotlib.pyplot as plt

from simple_diarizer.diarizer import Diarizer
from simple_diarizer.utils import combined_waveplot

diar = Diarizer(
                  embed_model='xvec', # 'xvec' and 'ecapa' supported
                  cluster_method='sc' # 'ahc' and 'sc' supported
               )

segments = diar.diarize(WAV_FILE, num_speakers=NUM_SPEAKERS)

signal, fs = sf.read(WAV_FILE)
combined_waveplot(signal, fs, segments)
plt.show()

Pre-trained Models

The following pretrained models are used:

Demo

Diarize any input Youtube URL

Open In Colab

Diarize any input wav file

Open In Colab

Other References

Planned Features

About

Simplified diarization pipeline using some pretrained models - audio file to diarized segments in a few lines of code

License:GNU General Public License v3.0


Languages

Language:Python 100.0%