All Projects → ina-foss → Inaspeechsegmenter

ina-foss / Inaspeechsegmenter

Licence: mit
CNN-based audio segmentation toolkit. Allows to detect speech, music and speaker gender. Has been designed for large scale gender equality studies based on speech time per gender.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Inaspeechsegmenter

Audiomate
Python library for handling audio datasets.
Stars: ✭ 99 (-71.87%)
Mutual labels:  noise, speech, music
Chromaprint.scala
Chromaprint/AcoustID audio fingerprinting for the JVM
Stars: ✭ 81 (-76.99%)
Mutual labels:  music, audio-analysis
Bpm
Library and tool for dealing with beats per second detection
Stars: ✭ 57 (-83.81%)
Mutual labels:  music, audio-analysis
Sound Source Localization Algorithm doa estimation
关于语音信号声源定位DOA估计所用的一些传统算法
Stars: ✭ 58 (-83.52%)
Mutual labels:  speech, music
Music Synthesis With Python
Music Synthesis with Python talk, originally given at PyGotham 2017.
Stars: ✭ 48 (-86.36%)
Mutual labels:  music, audio-analysis
Essentia
C++ library for audio and music analysis, description and synthesis, including Python bindings
Stars: ✭ 1,985 (+463.92%)
Mutual labels:  music, audio-analysis
Gist
A C++ Library for Audio Analysis
Stars: ✭ 244 (-30.68%)
Mutual labels:  music, audio-analysis
Voc
A physical model of the human vocal tract using literate programming, based on Pink Trombone.
Stars: ✭ 129 (-63.35%)
Mutual labels:  speech, music
Waveform analysis
Functions and scripts for analyzing waveforms, primarily audio. This is currently somewhat disorganized and unfinished.
Stars: ✭ 193 (-45.17%)
Mutual labels:  noise, audio-analysis
lidbox
End-to-end spoken language identification out of the box.
Stars: ✭ 39 (-88.92%)
Mutual labels:  speech, audio-analysis
DeepSegmentor
Sequence Segmentation using Joint RNN and Structured Prediction Models (ICASSP 2017)
Stars: ✭ 17 (-95.17%)
Mutual labels:  speech, segmentation
audio noise clustering
https://dodiku.github.io/audio_noise_clustering/results/ ==> An experiment with a variety of clustering (and clustering-like) techniques to reduce noise on an audio speech recording.
Stars: ✭ 24 (-93.18%)
Mutual labels:  speech, audio-analysis
Audio-Classification-using-CNN-MLP
Multi class audio classification using Deep Learning (MLP, CNN): The objective of this project is to build a multi class classifier to identify sound of a bee, cricket or noise.
Stars: ✭ 36 (-89.77%)
Mutual labels:  audio-analysis, noise
Qq Music Api
QQ 音乐API koa2实现
Stars: ✭ 320 (-9.09%)
Mutual labels:  music
Deepcut
A Thai word tokenization library using Deep Neural Network
Stars: ✭ 330 (-6.25%)
Mutual labels:  segmentation
Klystrack
A chiptune tracker
Stars: ✭ 321 (-8.81%)
Mutual labels:  music
Upnext
Chrome Extension for streaming music from SoundCloud & YouTube
Stars: ✭ 320 (-9.09%)
Mutual labels:  music
Unet
unet for image segmentation
Stars: ✭ 3,751 (+965.63%)
Mutual labels:  segmentation
Scribbletune
Create music with JavaScript
Stars: ✭ 3,509 (+896.88%)
Mutual labels:  music
Bcdu Net
BCDU-Net : Medical Image Segmentation
Stars: ✭ 314 (-10.8%)
Mutual labels:  segmentation

inaSpeechSegmenter

inaSpeechSegmenter is a CNN-based audio segmentation toolkit.

It splits audio signals into homogeneous zones of speech, music and noise. Speech zones are split into segments tagged using speaker gender (male or female). Male and female classification models are optimized for French language since they were trained using French speakers (accoustic correlates of speaker gender are language dependent). Zones corresponding to speech over music or speech over noise are tagged as speech.

inaSpeechSegmenter has been designed in order to perform large-scale gender equality studies based on men and women speech-time percentage estimation.

Installation

inaSpeechSegmenter is a framework in python 3. Only python versions greater or equal to 3.6 are supported. It can be installed using the following procedure:

Prerequisites

inaSpeechSegmenter requires ffmpeg for decoding any type of format. Installation of ffmpeg for ubuntu can be done using the following commandline:

$ sudo apt-get install ffmpeg

PIP installation

Simplest installation procedure

# create a python 3 virtual environement and activate it
$ virtualenv -p python3 inaSpeechSegEnv
$ source inaSpeechSegEnv/bin/activate
# install a backend for keras (tensorflow, theano, cntk...)
$ pip install tensorflow-gpu # if you wish GPU implementation (recommended if your host has a GPU)
$ pip install tensorflow # for a CPU implementation
# install framework and dependencies
$ pip install inaSpeechSegmenter

Installing from from sources

# clone git repository
$ git clone https://github.com/ina-foss/inaSpeechSegmenter.git
# create a python 3 virtual environement and activate it
$ virtualenv -p python3 inaSpeechSegEnv
$ source inaSpeechSegEnv/bin/activate
# install a backend for keras (tensorflow, theano, cntk...)
$ pip install tensorflow-gpu # if you wish GPU implementation (recommended)
$ pip install tensorflow # for a CPU implementation
# install framework and dependencies
$ cd inaSpeechSegmenter
$ python setup.py install
# check program behavior
$ python setup.py test

Using inaSpeechSegmenter

Speech Segmentation Program

Binary program ina_speech_segmenter.py may be used to segment multimedia archives encoded in any format supported by ffmpeg. It requires input media and output csv files corresponding to the segmentation. Corresponding csv may be visualised using softwares such as https://www.sonicvisualiser.org/

# get help
$ ina_speech_segmenter.py --help
usage: ina_speech_segmenter.py [-h] -i INPUT [INPUT ...] -o OUTPUT_DIRECTORY [-d {sm,smn}] [-g {true,false}] [-b FFMPEG_BINARY] [-e {csv,textgrid}]

Do Speech/Music(/Noise) and Male/Female segmentation and store segmentations into CSV files. Segments labelled 'noEnergy' are discarded from music, noise, speech and gender
analysis. 'speech', 'male' and 'female' labels include speech over music and speech over noise. 'music' and 'noise' labels are pure segments that are not supposed to contain speech.

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT [INPUT ...], --input INPUT [INPUT ...]
                        Input media to analyse. May be a full path to a media (/home/david/test.mp3), a list of full paths (/home/david/test.mp3 /tmp/mymedia.avi), a regex input
                        pattern ("/home/david/myaudiobooks/*.mp3"), an url with http protocol (http://url_of_the_file)
  -o OUTPUT_DIRECTORY, --output_directory OUTPUT_DIRECTORY
                        Directory used to store segmentations. Resulting segmentations have same base name as the corresponding input media, with csv extension. Ex: mymedia.MPG will
                        result in mymedia.csv
  -d {sm,smn}, --vad_engine {sm,smn}
                        Voice activity detection (VAD) engine to be used (default: 'smn'). 'smn' split signal into 'speech', 'music' and 'noise' (better). 'sm' split signal into
                        'speech' and 'music' and do not take noise into account, which is either classified as music or speech. Results presented in ICASSP were obtained using 'sm'
                        option
  -g {true,false}, --detect_gender {true,false}
                        (default: 'true'). If set to 'true', segments detected as speech will be splitted into 'male' and 'female' segments. If set to 'false', segments
                        corresponding to speech will be labelled as 'speech' (faster)
  -b FFMPEG_BINARY, --ffmpeg_binary FFMPEG_BINARY
                        Your custom binary of ffmpeg
  -e {csv,textgrid}, --export_format {csv,textgrid}
                        (default: 'csv'). If set to 'csv', result will be exported in csv. If set to 'textgrid', results will be exported to praat Textgrid

Detailled description of this framework is presented in the following study: Doukhan, D., Carrive, J., Vallet, F., Larcher, A., & Meignier, S. (2018, April). An open-source speaker
gender detection framework for monitoring gender equality. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) (pp. 5214-5218). IEEE.

Using Speech Segmentation API

InaSpeechSegmentation API is intended to be very simple to use. The class allowing to perform segmentations is called Segmenter. It is the only class that you need to import in a program. Class constructor accept 3 optional arguments:

  • vad_engine (default: 'smn'). Allows to choose between 2 voice activity detection engines.
    • 'smn' is the more recent engine and splits signal into speech, music and noise segments
    • 'sm' was not trained with noise examples, and split signal into speech and music segments. Noise segments are either considered as speech or music. This engine was used in ICASSP study, and won MIREX 2018 speech detection challenge.
  • detect_gender (default: True): if set to True, performs gender segmentation on speech segment and outputs labels 'female' or 'male'. Otherwise, outputs labels 'speech' (faster).
  • ffmpeg: allows to provide a specific binary of ffmpeg instead of default system installation

See the following notebook for a comprehensive example: API Tutorial Here!

Citing

inaSpeechSegmenter has been presented at the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) 2018 conference in Calgary, Canada. If you use this toolbox in your research, you can cite the following work in your publications :

@inproceedings{ddoukhanicassp2018,
  author = {Doukhan, David and Carrive, Jean and Vallet, Félicien and Larcher, Anthony and Meignier, Sylvain},
  title = {An Open-Source Speaker Gender Detection Framework for Monitoring Gender Equality},
  year = {2018},
  organization={IEEE},
  booktitle={Acoustics Speech and Signal Processing (ICASSP), 2018 IEEE International Conference on}
}

inaSpeechSegmenter won MIREX 2018 speech detection challenge.
http://www.music-ir.org/mirex/wiki/2018:Music_and_or_Speech_Detection_Results
Details on the speech detection submodule can be found bellow:

@inproceedings{ddoukhanmirex2018,
  author = {Doukhan, David and Lechapt, Eliott and Evrard, Marc and Carrive, Jean},
  title = {INA’S MIREX 2018 MUSIC AND SPEECH DETECTION SYSTEM},
  year = {2018},
  booktitle={Music Information Retrieval Evaluation eXchange (MIREX 2018)}
}

CREDITS

This work was realized in the framework of MeMAD project. https://memad.eu/ MeMAD is an EU funded H2020 research project. It has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 780069.

Some optimization within inaSpeechSegmenter code were realized by Cyril Lashkevich https://github.com/notorca

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].