Skip to content

Instantly share code, notes, and snippets.

View hbredin's full-sized avatar

Hervé BREDIN hbredin

View GitHub Profile
@hbredin
hbredin / gap_max_duration.ipynb
Created November 12, 2020 15:28
Visual explanation of speech turn segmentation pipeline (and the role of gap_max_duration hyper-parameter)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hbredin
hbredin / streamlit_colab.ipynb
Created May 8, 2020 12:55 — forked from tuffacton/streamlit_colab.ipynb
Colaboratory Notebook that hosts a streamlit app and creates an ngrok https tunnel for access.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hbredin
hbredin / jer.py
Last active March 28, 2019 09:56
How to compute Jaccard Error Rate
# load UEM, references, and system output
from pyannote.database.util import load_rttm, load_uem
uems = load_uem('references.uem')
references = load_rttm('references.rttm')
hypotheses = load_rttm('hypotheses.rttm')
from pyannote.metrics.diarization import JaccardErrorRate
metric = JaccardErrorRate()
# compute (and print) JER for each file
@hbredin
hbredin / AddNoiseFromGaps.ipynb
Created March 1, 2019 10:01
pyannote.audio.augmentation.noise
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hbredin
hbredin / generic.ipynb
Created February 28, 2019 14:18
On-the-fly database class generation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hbredin
hbredin / pipeline.py
Last active November 27, 2018 15:30
Pipeline 101
from pyannote.pipeline import Pipeline
import chocolate
class MyPipeline(Pipeline):
def __int__(self):
super().__init__()
self.damping = chocolate.uniform(...)
self.preference = chocolate.uniform(...)
def __call__(self, item):
@hbredin
hbredin / sinc_conv.py
Last active April 20, 2024 09:36
Implementation of SincConv layer in pytorch
#!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2018 CNRS
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@hbredin
hbredin / HowToEvaluateYourRuns.ipynb
Last active June 8, 2018 14:55
How to evaluate runs on the validation file (aka file 5082189274976367100)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hbredin
hbredin / Estimating the learning rate bounds for the "1cycle policy".ipynb
Last active May 30, 2018 01:04
Estimating the learning rate bounds for the "1cycle policy"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hbredin
hbredin / smorms3.py
Created March 8, 2018 11:02
Keras implementation of SMORMS3 optimizer
from keras.legacy import interfaces
from keras.optimizers import Optimizer
import keras.backend as K
class SMORMS3(Optimizer):
"""SMORMS3 optimizer.
Default parameters follow those provided in the blog post.