Dataset Viewer
The dataset viewer is not available for this dataset.
Cannot get the config names for the dataset.
Error code:   RetryableConfigNamesError
Exception:    HfHubHTTPError
Message:      Server error '504 Gateway Time-out' for url 'https://huggingface.co/api/datasets/k9cli/video-vec2wav2-tokenizer-2/tree/1a57c4926005dc9914980ee05ee2ead62ccb5f8f?recursive=true&expand=false'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response
                  config_names = get_dataset_config_names(
                      path=dataset,
                      token=hf_token,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names
                  dataset_module = dataset_module_factory(
                      path,
                  ...<4 lines>...
                      **download_kwargs,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1217, in dataset_module_factory
                  raise e1 from None
                File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1192, in dataset_module_factory
                  ).get_module()
                    ~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 648, in get_module
                  patterns = get_data_patterns(base_path, download_config=self.download_config)
                File "/usr/local/lib/python3.14/site-packages/datasets/data_files.py", line 493, in get_data_patterns
                  return _get_data_files_patterns(resolver)
                File "/usr/local/lib/python3.14/site-packages/datasets/data_files.py", line 290, in _get_data_files_patterns
                  data_files = pattern_resolver(pattern)
                File "/usr/local/lib/python3.14/site-packages/datasets/data_files.py", line 372, in resolve_pattern
                  for filepath, info in fs.glob(fs_pattern, detail=True, **glob_kwargs).items():
                                        ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/huggingface_hub/hf_file_system.py", line 728, in glob
                  return super().glob(path, maxdepth=maxdepth, **kwargs)
                         ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/fsspec/spec.py", line 611, in glob
                  allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs)
                File "/usr/local/lib/python3.14/site-packages/huggingface_hub/hf_file_system.py", line 767, in find
                  out = self._ls_tree(path, recursive=True, refresh=refresh, maxdepth=maxdepth, **kwargs)
                File "/usr/local/lib/python3.14/site-packages/huggingface_hub/hf_file_system.py", line 586, in _ls_tree
                  self._ls_tree(
                  ~~~~~~~~~~~~~^
                      common_path,
                      ^^^^^^^^^^^^
                  ...<4 lines>...
                      maxdepth=maxdepth,
                      ^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/huggingface_hub/hf_file_system.py", line 612, in _ls_tree
                  for path_info in tree:
                                   ^^^^
                File "/usr/local/lib/python3.14/site-packages/huggingface_hub/hf_api.py", line 3922, in list_repo_tree
                  for path_info in paginate(path=tree_url, headers=headers, params={"recursive": recursive, "expand": expand}):
                                   ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/huggingface_hub/utils/_pagination.py", line 36, in paginate
                  hf_raise_for_status(r)
                  ~~~~~~~~~~~~~~~~~~~^^^
                File "/usr/local/lib/python3.14/site-packages/huggingface_hub/utils/_http.py", line 877, in hf_raise_for_status
                  raise _format(HfHubHTTPError, str(e), response) from e
              huggingface_hub.errors.HfHubHTTPError: Server error '504 Gateway Time-out' for url 'https://huggingface.co/api/datasets/k9cli/video-vec2wav2-tokenizer-2/tree/1a57c4926005dc9914980ee05ee2ead62ccb5f8f?recursive=true&expand=false'
              For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

video-vec2wav2-tokenizer-2

Version 2 - continuation shard of the video-to-AI-dataset tokenizer project.

Production-ready pipeline (Python package video_vec2wav2_tokenizer, CLI command video2dataset) that turns a folder of videos into clean AI training datasets for speech recognition (ASR) and text-to-speech (TTS).

videos  ──►  audio (16 kHz mono PCM)  ──►  whisper transcript  ──►  clips  ──►  metadata.csv / dataset.jsonl / tts_metadata.csv / report.json
  • Video processing — recursive scan of mp4 / mkv / avi / mov / webm, FFmpeg audio extraction to mono · 16 kHz · 16-bit PCM WAV.
  • Speech recognitionfaster-whisper, CPU & CUDA, automatic language detection, word-level timestamps.
  • Segmentation — cut audio by transcript timestamps into dataset/audio/000001.wav ….
  • Dataset generationmetadata.csv, dataset.jsonl, tts_metadata.csv.
  • Feature extraction (optional) — streaming features/train.bin + train.dat with float32 samples, mel spectrograms, duration and sample rate.
  • Statisticsreport.json with totals, durations and language distribution.
  • Trainingtrain_wav2vec2.py: HuggingFace Wav2Vec2 CTC with resume, multi-GPU, mixed precision and checkpointing.
  • Performance — multiprocessing, batch processing, tqdm progress bars and memory-efficient streaming that scales past 1 TB of source media.

Installation

Requires Python 3.11+ and the FFmpeg binary on your PATH.

# 1. FFmpeg (one of):
#    macOS:   brew install ffmpeg
#    Ubuntu:  sudo apt install ffmpeg
#    Windows: winget install Gyan.FFmpeg   (or choco install ffmpeg)

# 2. The package
python -m venv .venv && source .venv/bin/activate     # Windows: .venv\Scripts\activate
pip install -r requirements.txt
pip install -e .                # exposes the `video2dataset` command

# Optional: training extras (torch + transformers)
pip install -e ".[train]"

Verify:

video2dataset --version
ffmpeg -version

Quick start

# Drop videos into input/videos/ (any nesting), then run the full pipeline:
video2dataset process ./input/videos --extract-features

Outputs land under dataset/:

dataset/
├── audio/
│   ├── 000001.wav
│   ├── 000002.wav
│   └── ...
├── metadata.csv          # 000001.wav|Hello world
├── dataset.jsonl         # {"audio":"audio/000001.wav","text":"Hello world","duration":2.5}
├── tts_metadata.csv      # 000001.wav|speaker_001|Hello world
└── report.json
features/
├── train.bin
└── train.dat

CLI

video2dataset process    ./videos        # video -> full dataset
video2dataset transcribe ./audio         # wav -> transcripts/<name>.jsonl
video2dataset segment    ./audio         # wav + sidecar transcript -> clips
video2dataset features   ./dataset       # clips -> features/train.{bin,dat}
video2dataset train      ./dataset       # fine-tune Wav2Vec2 CTC

Global flags (override config.yaml): --config, --output-dir, --device {auto,cpu,cuda}, --whisper-model, --language, -v/--verbose.

# Examples
video2dataset process ./input/videos --whisper-model large-v3 --device cuda
video2dataset process ./input/videos --language en --output-dir build/en
video2dataset transcribe ./dataset/_work --device cpu
video2dataset features ./dataset
video2dataset train ./dataset --epochs 30 --batch-size 8 --resume

Multi-GPU training

torchrun --nproc_per_node=4 -m video_vec2wav2_tokenizer.training.train_wav2vec2 \
    --dataset-dir dataset --output-dir dataset/checkpoints

Configuration (config.yaml)

model_name: facebook/wav2vec2-base-960h   # training model
whisper_model: large-v3                    # ASR model
language: null                             # null = auto-detect
device: auto                               # auto | cpu | cuda
sample_rate: 16000
channels: 1
min_segment_length: 1.0
max_segment_length: 20.0
default_speaker: speaker_001
speaker_mode: fixed                        # fixed | per_video | per_file
output_dir: dataset
features_dir: features
num_workers: 4
batch_size: 16

speaker_mode controls TTS speaker identification: a single fixed speaker, one per source video, or one per clip.


Architecture

video-vec2wav2-tokenizer-2/        # repo root
├── config.yaml
├── requirements.txt
├── pyproject.toml
├── README.md
├── input/videos/                  # drop source videos here
└── video_vec2wav2_tokenizer/      # importable package
    ├── cli/            # argparse command surface
    ├── audio/          # FFmpeg extraction + WAV loading/resampling
    ├── transcription/  # faster-whisper wrapper (lazy import)
    ├── segmentation/   # timestamp normalisation + clip cutting
    ├── features/       # streaming bin/dat feature store + mel spectrograms
    ├── training/       # Wav2Vec2 CTC trainer
    ├── utils/          # config, logging, data models, IO
    ├── configs/        # packaged default.yaml
    ├── tests/          # pytest suite (no heavy deps required)
    ├── pipeline.py     # end-to-end orchestration
    ├── dataset_builder.py / statistics.py
    └── main.py         # `python main.py` entry point

Design notes:

  • Lazy heavy imports. faster-whisper, torch and transformers are imported only when their command runs, so the core library and tests stay light and fast.
  • Streaming everywhere. Transcription consumes whisper's generator; clips and manifest rows are produced per source video; the feature store appends one clip at a time. Memory use is independent of corpus size.
  • Graceful degradation. WAV IO and mel spectrograms fall back to stdlib + NumPy when soundfile/librosa aren't installed.
  • Fault tolerant. A failing video is logged and skipped; the run continues.

Output formats

File Format
metadata.csv `000001.wav
dataset.jsonl {"audio":"audio/000001.wav","text":"Hello world","duration":2.5}
tts_metadata.csv `000001.wav
report.json totals, total/average duration, language distribution
features/train.bin flat little-endian float32: audio samples + mel per clip
features/train.dat JSONL index (offsets, shapes, duration, sample rate)

Testing

pip install -e ".[dev]"
pytest                                 # runs video_vec2wav2_tokenizer/tests
pytest --cov=video_vec2wav2_tokenizer  # with coverage

The default test suite needs only numpy, pyyaml and pytest — no FFmpeg, whisper or torch required.


License

MIT.

Downloads last month
113,509