CoolFace
Datasetpublic

Alirezav99/ganjoor

Ganjoor Persian Speech Dataset Dataset Description This dataset contains Persian speech recordings from Ganjoor.ir, segmented based on Persian poetry verses. The audio files have been processed and segmented into manageable chunks suitable for speech-to-text (STT) training and evaluation. Dataset Summary Language: Persian (Farsi) Domain: Persian poetry (classical and contemporary) Task: Automatic Speech Recognition (ASR) Format: MP3 audio files… See the full description on the dataset page: https://huggingface.co/datasets/Alirezav99/ganjoor.

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes89downloads
Dataset Card

Ganjoor Persian Speech Dataset

Dataset Description

This dataset contains Persian speech recordings from Ganjoor.ir, segmented based on Persian poetry verses. The audio files have been processed and segmented into manageable chunks suitable for speech-to-text (STT) training and evaluation.

Dataset Summary

  • —Language: Persian (Farsi)
  • —Domain: Persian poetry (classical and contemporary)
  • —Task: Automatic Speech Recognition (ASR)
  • —Format: MP3 audio files with corresponding transcriptions

Supported Tasks

  • —Speech Recognition: The dataset can be used to train ASR models for Persian language
  • —Poetry Recognition: Specialized for understanding poetic Persian speech
  • —Language Modeling: Text can be used for Persian language model training

Dataset Structure

Data Instances

Each instance contains:

  • —audio: Audio file in MP3 format (16kHz sample rate)
  • —transcript: Text transcription of the audio
  • —word_count: Number of words in the transcript
  • —character_count: Number of characters in the transcript
  • —duration_seconds: Duration of the audio segment in seconds
  • —sample_rate: Audio sample rate (16000 Hz)

Data Splits

  • —Train: ~90% of the dataset
  • —Validation: ~10% of the dataset

Data Fields

FieldTypeDescription
audioAudioAudio file with 16kHz sampling rate
transcriptstringPersian text transcription
word_countint64Number of tokens/words in transcript
character_countint64Number of characters in transcript
duration_secondsfloat64Audio duration in seconds
sample_rateint64Audio sampling rate (16000)

Dataset Creation

Source Data

The audio files are sourced from Ganjoor.ir, a comprehensive repository of Persian poetry with audio recitations.

Data Processing

  1. 1.Audio Collection: Audio files collected from Ganjoor repository
  2. 2.Segmentation: Audio files segmented based on verse timing information
  3. 3.Duration Control: Segments limited to maximum 30 seconds for optimal training
  4. 4.Quality Control: Corrupted audio files automatically repaired using ffmpeg
  5. 5.Filtering: Verses with durations < 2 seconds or > 30 seconds are excluded

Processing Pipeline

The dataset is processed using the script available in the repository:

  • —Parallel processing using Dask for efficient computation
  • —Automatic audio repair for corrupted files
  • —Metadata generation with comprehensive statistics

Usage

Loading the Dataset

python
from datasets import load_dataset

# Load the dataset
dataset = load_dataset("Alirezav99/ganjoor")

# Access splits
train_dataset = dataset["train"]
val_dataset = dataset["validation"]

# Example: iterate through samples
for sample in train_dataset:
    audio = sample["audio"]
    transcript = sample["transcript"]
    print(f"Duration: {sample['duration_seconds']}s")
    print(f"Transcript: {transcript}")

Training Example

python
from transformers import WhisperProcessor, WhisperForConditionalGeneration

# Load model and processor
processor = WhisperProcessor.from_pretrained("openai/whisper-small")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-small")

# Prepare dataset
def prepare_dataset(batch):
    audio = batch["audio"]
    batch["input_features"] = processor(
        audio["array"], 
        sampling_rate=audio["sampling_rate"]
    ).input_features[0]
    batch["labels"] = processor.tokenizer(batch["transcript"]).input_ids
    return batch

# Process and train
dataset = dataset.map(prepare_dataset, remove_columns=dataset.column_names["train"])

Dataset Statistics

  • —Sample Rate: 16kHz
  • —Audio Format: MP3
  • —Max Segment Duration: 30 seconds
  • —Min Verse Duration: 2 seconds
  • —Language: Persian (fa)

Considerations

Social Impact

This dataset focuses on Persian poetry, which represents an important part of Persian cultural heritage. It can help:

  • —Preserve and digitize Persian literary audio content
  • —Improve ASR systems for formal Persian language
  • —Enable better accessibility to Persian poetry through transcription

Limitations

  • —The dataset contains poetic language, which may differ from conversational Persian
  • —Audio quality varies depending on the source recordings
  • —Limited to the speaking style used in poetry recitation
  • —May not generalize well to other Persian dialects or informal speech

Citation

If you use this dataset, please cite:

bibtex
@dataset{ganjoor_persian_speech,
  title={Ganjoor Persian Speech Dataset},
  author={Alireza},
  year={2026},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/datasets/Alirezav99/ganjoor}}
}

License

Please refer to Ganjoor.ir for the original content licensing terms.

Acknowledgments

  • —Ganjoor.ir for providing the poetry audio and text data
  • —All the reciters whose voices are included in this dataset
  • —The Persian poetry community for maintaining this cultural resource