PSRB_HF_FORMAT / README.md
BDanial's picture
Update README.md
00c2ff7 verified
|
Raw
History Blame Contribute Delete
2.59 kB
metadata
dataset_info:
  features:
    - name: audio
      dtype:
        audio:
          sampling_rate: 16000
    - name: audio_duration
      dtype: float64
    - name: number_of_speakers
      dtype: int64
    - name: text
      dtype: string
    - name: gender
      dtype: string
    - name: age
      dtype: string
    - name: accents
      dtype: string
    - name: formality
      dtype: string
    - name: semantic_content
      dtype: string
    - name: data_source
      dtype: string
    - name: acoustic_environment
      dtype: string
    - name: spontaneous
      dtype: int64
  splits:
    - name: test
      num_bytes: 402008962
      num_examples: 344
  download_size: 387412980
  dataset_size: 402008962
configs:
  - config_name: default
    data_files:
      - split: test
        path: data/test-*

PSRB - Hugging Face Format

All credits for the original dataset go to PartAI/PSRB.

Dataset Overview

This repository contains a formatted version of the PSRB dataset designed to work out-of-the-box with the Hugging Face datasets and transformers ecosystem for Automatic Speech Recognition (ASR) tasks.

What Was Done

The original data, which was formatted as a CSV with local audio paths, was processed into a Hugging Face DatasetDict. Specifically:

  • The raw Pandas DataFrame was converted to a Hugging Face Dataset.
  • The name of columns has been fixed. For example the text was saved in audio_duration column, the audio_duration was saved in number_of_speakers column, etc. Now each column contains correct related data.
  • The audio is in the audio column and the text in the text column.
  • The audio paths were cast to the Audio(sampling_rate=16000) feature, meaning the dataset will automatically read and decode the raw waveforms into 16kHz PyTorch/NumPy arrays when queried.
  • All original metadata columns (audio_duration, number_of_speakers, gender, age, accents, formality, semantic_content, data_source, acoustic_environment, spontaneous) were strictly preserved to allow for detailed WER analysis across different demographics and acoustic environments.

Quick Start

You can load and use the dataset directly without worrying about local file paths:

from datasets import load_dataset

# Load the dataset
dataset = load_dataset("your-username/your-dataset-name")

# Access the first sample's audio array and transcription
sample = dataset["test"][0]

audio_array = sample["audio"]["array"]
transcription = sample["text"]

print(f"Transcription: {transcription}")
print(f"Speaker Gender: {sample['gender']}")