Implementation:Speechbrain Speechbrain Prepare KsponSpeech
| Knowledge Sources | |
|---|---|
| Domains | Speech_Recognition, Data_Preparation |
| Last Updated | 2026-02-09 00:00 GMT |
Overview
Concrete tool for preparing the KsponSpeech dataset for automatic speech recognition provided by the SpeechBrain library.
Description
This script creates CSV data manifest files for the KsponSpeech (Korean Spontaneous Speech) dataset. It processes raw audio files and transcriptions, generates per-split CSV files with audio paths, durations, and transcripts, and supports merging multiple splits into a single CSV. The script handles Korean text normalization and is designed for the transformer-based ASR recipe.
Usage
Use this when preparing the KsponSpeech dataset for Korean ASR training with SpeechBrain recipes.
Code Reference
Source Location
- Repository: SpeechBrain
- File: recipes/KsponSpeech/ASR/transformer/ksponspeech_prepare.py
Signature
def prepare_ksponspeech(
data_folder,
save_folder,
tr_splits=[],
dev_splits=[],
te_splits=[],
select_n_sentences=None,
merge_lst=[],
merge_name=None,
skip_prep=False,
):
Import
from recipes.KsponSpeech.ASR.transformer.ksponspeech_prepare import prepare_ksponspeech
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| data_folder | str | Yes | Path to the folder where the original KsponSpeech dataset is stored |
| save_folder | str | Yes | Directory where CSV files will be stored |
| tr_splits | list | No | List of train splits (e.g. ['train', 'dev', 'eval_clean', 'eval_other']) |
| dev_splits | list | No | List of dev splits (e.g. ['dev']) |
| te_splits | list | No | List of test splits (e.g. ['eval_clean', 'eval_other']) |
| select_n_sentences | int | No | If set, only use this many sentences (default: None) |
| merge_lst | list | No | List of splits to merge into a single CSV file |
| merge_name | str | No | Name of the merged CSV file |
| skip_prep | bool | No | If True, skip data preparation (default: False) |
Outputs
| Name | Type | Description |
|---|---|---|
| {split}.csv | CSV | Per-split manifest files with audio paths, durations, and transcriptions |
| {merge_name}.csv | CSV | Optionally merged CSV combining multiple splits |
Usage Examples
from recipes.KsponSpeech.ASR.transformer.ksponspeech_prepare import prepare_ksponspeech
prepare_ksponspeech(
data_folder="/path/to/KsponSpeech",
save_folder="/path/to/output",
tr_splits=["train"],
dev_splits=["dev"],
te_splits=["eval_clean", "eval_other"],
)