CoolFace
Datasetpublic

k9cli/video-vec2wav2-tokenizer

video-vec2wav2-tokenizer 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 ·… See the full description on the dataset page: https://huggingface.co/datasets/k9cli/video-vec2wav2-tokenizer.

sourceHugging Faceupdated 2d agoView on Hugging Face
26likes687kdownloads
conftest.py32 linesDownload Raw Back to tests
1"""Shared pytest fixtures."""2 3from __future__ import annotations4 5import wave6from pathlib import Path7 8import numpy as np9import pytest10 11 12def _write_sine_wav(path: Path, duration: float = 3.0, sr: int = 16000) -> Path:13    t = np.linspace(0, duration, int(sr * duration), endpoint=False)14    tone = 0.3 * np.sin(2 * np.pi * 220 * t)15    ints = (tone * 32767).astype(np.int16)16    with wave.open(str(path), "wb") as wf:17        wf.setnchannels(1)18        wf.setsampwidth(2)19        wf.setframerate(sr)20        wf.writeframes(ints.tobytes())21    return path22 23 24@pytest.fixture25def sine_wav(tmp_path: Path) -> Path:26    return _write_sine_wav(tmp_path / "tone.wav")27 28 29@pytest.fixture30def sample_rate() -> int:31    return 1600032 
k9cli/video-vec2wav2-tokenizer · CoolFace