Skip to main content

Data preparation package for the Phoneme Discovery benchmark

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Data preparation

First, install the discophon.prepare package:

pip install discophon.prepare

You also need the sox binary available in your $PATH for pre-processing audio files.

Now let's say you want to install the benchmark data and assets in a directory $DATA.

Download Common Voice data

You first need to download audio data from CommonVoice. You can use their API if you don't want to download large files on your local computer.

Download everything in $DATA/raw.

Dev languages:

Test languages:

Extract each archive, with tar --strip-components=1 -xvf ....

For example, let's say your archive is named mcv-scripted-uk-v23.0.tar.gz. Extract it with tar --strip-components=1 -xvf mcv-scripted-uk-v23.0.tar.gz, and move the output directory to $DATA/raw.

You can delete the archives afterwards. You should have the following structure:

 tree -L 2 $DATA
$DATA
└── raw
    ├── de
    ├── en
    ├── eu
    ├── fr
    ├── ja
    ├── sw
    ├── ta
    ├── th
    ├── tr
    ├── uk
    └── zh-CN

Download benchmark assets

Now download the benchmark assets with the following command:

python -m discophon.prepare download $DATA

This will download:

  • Symlinks to audio files for each split in each language
  • Manifests
  • Alignments and item files

Preprocess selected audio files

Now resample audio files and convert them to WAV with the command:

for code in de en eu fr ja sw ta th tr uk zh-CN; do
    python -m discophon.prepare audio $DATA $code
done

This will create directories $DATA/audio/cmn/all, $DATA/audio/deu/all, $DATA/audio/eng/all, etc. with resampled audio files. The directories corresponding to each split contain symlinks to those files.

You can parellize this loop. You can delete the $DATA/raw folder afterwards.

If you are in a SLURM cluster, you should also parallelize each dataset processing across tasks or array jobs. The discohpon.prepare package will automatically handle the distribution of files to process across jobs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discophon_prepare-0.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discophon_prepare-0.0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file discophon_prepare-0.0.2.tar.gz.

File metadata

  • Download URL: discophon_prepare-0.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for discophon_prepare-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d7a483702f495b9d748160699a302972f0ebf56ef2456c9ce7c4cbbe7b3841ff
MD5 fca7ab33f93b1bcbf4dd838eac617b21
BLAKE2b-256 5a8f78c9a992119b0cea5592c7d4a8ae3ea89281e899c4add35652a214f10e9e

See more details on using hashes here.

File details

Details for the file discophon_prepare-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: discophon_prepare-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for discophon_prepare-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fe87d636de2844b24b7845c161ec82f2600f872c565cf8161f247d6f55969be3
MD5 5f5b862c588579f23cf8a89c1223e394
BLAKE2b-256 bee6d97b909d299e243706af1a43af637268ebf4b3f07eb694c9042512208c76

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page