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:
- Common Voice Scripted Speech 23.0 - German (34.41 GB)
- Common Voice Scripted Speech 23.0 - Swahili (21.23 GB)
- Common Voice Scripted Speech 23.0 - Tamil (8.56 GB)
- Common Voice Scripted Speech 23.0 - Thai (8.35 GB)
- Common Voice Scripted Speech 23.0 - Turkish (2.73 GB)
- Common Voice Scripted Speech 23.0 - Ukrainian (2.55 GB)
Test languages:
- Common Voice Scripted Speech 23.0 - Basque (14.58 GB)
- Common Voice Scripted Speech 23.0 - Chinese (China) (21.26 GB)
- Common Voice Scripted Speech 23.0 - English (86.83 GB)
- Common Voice Scripted Speech 23.0 - French (27.87 GB)
- Common Voice Scripted Speech 23.0 - Japanese (11.80 GB)
- Wolof data comes from a different source, and will be downloaded with the other assets in the following section.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ebb1f33fdfe8d4e2fa73c078a3199b52a20c8a042a1d01a4df5c472176ceb91
|
|
| MD5 |
0909c20913454dbd1a748b04573960a1
|
|
| BLAKE2b-256 |
fe96347013af9a886451bda54d734b274e3932d02fe5e02332e9253d0a5537ec
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cd4af0b4b9a2aa9b8ef0f511b1f9611e888149118ee3db77b2f968d2e45d856
|
|
| MD5 |
9666c448199fcb65a47a5abd312f6ec1
|
|
| BLAKE2b-256 |
beaf4b2476dd683686298f8d2ca3f1022c1ead71bed6068b27e3f788257580fc
|