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.1.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.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: discophon_prepare-0.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • 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.1.tar.gz
Algorithm Hash digest
SHA256 5ebb1f33fdfe8d4e2fa73c078a3199b52a20c8a042a1d01a4df5c472176ceb91
MD5 0909c20913454dbd1a748b04573960a1
BLAKE2b-256 fe96347013af9a886451bda54d734b274e3932d02fe5e02332e9253d0a5537ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: discophon_prepare-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5cd4af0b4b9a2aa9b8ef0f511b1f9611e888149118ee3db77b2f968d2e45d856
MD5 9666c448199fcb65a47a5abd312f6ec1
BLAKE2b-256 beaf4b2476dd683686298f8d2ca3f1022c1ead71bed6068b27e3f788257580fc

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