Giter VIP home page Giter VIP logo

voxceleb-luigi's Introduction

voxceleb-luigi

pypi version

Luigi pipeline to download VoxCeleb audio from YouTube and extract speaker segments.

This pipeline can download both VoxCeleb and VoxCeleb2.

Installation

pip install voxceleb_luigi

You need to have ffmpeg and youtube-dl installed. On systems with apt, you can simply run:

sudo apt install ffmpeg youtube-dl

Usage

Download and unpack at least one of the metadata directories with the YouTube URLs and timestamps (VC1 dev/test, VC2 dev/test).

Start luigid, the central scheduler:

luigid --background

Then start the worker process:

luigi --module voxceleb_luigi \
    --workers 4 \
    voxceleb.ProcessDirectory \
    --path /path/to/metadata

The pipeline will recursively search /path/to/metadata for the segment files (by looking for files called like 00001.txt etc.), download the audio of their source videos, and extract the speaker segments.

By default, the segment audio files are stored in parallel to the metadata in directories called wav that get created next to the txt directories. Suppose you have the metadata of the dev and test sets of VoxCeleb1 in ~/vc1 with paths looking like ~/vc1/dev/txt/idX/videoX/XXXXX.txt. If you pass --path ~/vc1 to the pipeline, segments will end up in ~/vc1/dev/wav/idX/videoX/XXXXX.wav. Other output of the pipeline (full audio of videos, soft failures, dummy outputs for completed directories) are stored in ./voxceleb-luigi-files by default.

Configuration

Both the location where the dataset gets created and the storage directory for the pipeline can be changed through parameters in the luigi.cfg (default location is the current working directory; you can override this via the LUIGI_CONFIG_PATH environment variable):

[voxceleb.Config]
# Required
output_dir=/where/to/store/wav/segments
pipeline_dir=/where/to/put/pipeline/stuff

## Only necessary if youtube-dl, ffmpeg, and ffprobe are not in your PATH:
#ffmpeg_bin=/ffmpeg-dir/ffmpeg
#ffmpeg_directory=/ffmpeg-dir # passed on to youtube-dl via --ffmpeg-location
#youtube_dl_bin=/path/to/youtube-dl

[voxceleb.ProcessDirectory]
## alternative to the --path command line option
#path=/path/to/metadata

When output_dir is set, the directory structure of the metadata is mirrored in this directory. In this case, the txt directories are not replaced by wav, but removed from the path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.