N02N9's picture
Update README.md
858f5f8 verified
# Multilingual Yodas Streaming Dataset (OWSMv4 Optimized)
This repository provides a **streaming-ready** version of the Yodas (Yielding Optimized Data from Any Source) dataset. It is specifically designed for training and fine-tuning large-scale **Multilingual ASR models** (such as OWSM v4, Mamba-based architectures, and beyond) without the need to download terabytes of raw data.
By utilizing a custom Lhotse-based loading script, this dataset allows researchers to stream audio data directly into their training pipeline using `curl` and `ffmpeg`.
---
## 🚀 Key Features
* **Massively Multilingual**: Designed to support up to **75 languages**, providing a unified interface for global speech research.
* **Zero-Download Streaming**: Access over 20 million audio cuts in real-time. No massive local storage is required.
* **Lhotse Integration**: Uses `Lhotse` manifests for precise audio slicing and robust metadata management.
---
## 🛠️ Prerequisites
To ensure the streaming loader functions correctly, your environment must meet the following requirements:
### 1. System Dependencies
The loader relies on system-level pipes to stream audio. Ensure these are installed and added to your **PATH**:
* **FFmpeg**: Required for real-time audio decoding.
* **curl**: Required for streaming data from remote servers.
### 2. Python Libraries
Due to changes in the Hugging Face `datasets` library (v3.0+), you **must** use a version lower than 3.0.0 to support custom loading scripts.
```bash
pip install "datasets<3.0.0" lhotse torchaudio smart_open requests
```
---
## 💻 Usage
To use this dataset, you must enable `trust_remote_code=True` and `streaming=True`.
```python
from datasets import load_dataset
# Load the dataset in streaming mode
dataset = load_dataset(
"N02N9/yodas_owsmv4_streaming",
trust_remote_code=True,
streaming=True
)
# Accessing the data (IterableDataset)
train_iter = iter(dataset['train'])
sample = next(train_iter)
print(f"ID: {sample['id']}")
print(f"Language: {sample['id'].split('_')[-2]}") # Language code extraction
print(f"Text: {sample['text']}")
print(f"Audio Sample Rate: {sample['audio']['sampling_rate']}Hz")
```
---
## 📊 Dataset Features
| Feature | Type | Description |
| :--- | :--- | :--- |
| **id** | string | Unique identifier for each audio cut (includes language info) |
| **audio** | dict | Real-time decoded audio (array, sampling_rate=16kHz) |
| **text** | string | The transcribed text for the audio segment |
---
## ⚠️ Troubleshooting & FAQ
* **`KeyError: 'text'`**: This usually happens if the loader script (`yodas_owsmv4_streaming.py`) failed to run or if you are using a cached version of the dataset. Try adding `download_mode="force_redownload"` to the `load_dataset` function.
* **Hanging on Windows**: As mentioned above, this loader is not compatible with Windows. Please use a **Linux/WSL2** environment.
* **Library Version**: If you get a "Loading script unsupported" error, downgrade your datasets library: `pip install "datasets<3.0.0"`.
---
## 📜 License & Acknowledgments
* **Original Source**: [Yodas Dataset (Meta/ESPnet)](https://huggingface.co/datasets/espnet/yodas_owsmv4)
* **Modifications**: Custom Lhotse-based streaming loader and offset corrections by **N02N9**.
* **License**: This dataset follows the licensing terms of the original Yodas release (typically CC-BY 4.0). Please credit the original authors accordingly.