--- license: mit language: - ja base_model: openai/whisper-large-v3 tags: - automatic-speech-recognition - whisper - lora - peft - japanese - filler-detection - disfluency library_name: peft --- # Whisper Large-v3 Japanese Filler LoRA Adapter 日本語音声からフィラー(「あの」「まあ」「えー」等の言い淀み)を**取りこぼさずに**文字起こしするための LoRA アダプタ。OpenAI Whisper Large-v3 の Decoder 層に rank=16 の LoRA を適用して fine-tune したもの。 ## 性能 (held-out 9.2 分、initial_prompt なし) | 指標 | Base Whisper | This LoRA | 改善 | |------|-------------|-----------|------| | Char WER | 8.61% | **5.59%** | **-35% 相対** | | FIR (Filler Inclusion Rate) | 13.3% | **48.9%** | **3.7倍** | | filler recall | 6/45 | 22/45 | +16 | WhisperD 論文 ([arXiv 2505.21551](https://arxiv.org/abs/2505.21551)) で FIR 0.04→0.70 を達成したアプローチを 50 分の訓練データで再現した形。 ## 使い方 ### 1. Python + PEFT + transformers ```python import torch from transformers import WhisperForConditionalGeneration, WhisperProcessor from peft import PeftModel processor = WhisperProcessor.from_pretrained( "openai/whisper-large-v3", language="japanese", task="transcribe" ) base = WhisperForConditionalGeneration.from_pretrained( "openai/whisper-large-v3", dtype=torch.float16 ) model = PeftModel.from_pretrained(base, "Coidemo/whisper-large-v3-filler-lora") # 推論用にマージしたい場合: merged = model.merge_and_unload() ``` ### 2. MLX 版で使う場合 (Apple Silicon 推奨) マージ + MLX 変換済みモデルが [`Coidemo/whisper-large-v3-filler-mlx`](https://huggingface.co/Coidemo/whisper-large-v3-filler-mlx) で公開されている。 ```python import mlx_whisper result = mlx_whisper.transcribe( "video.mp4", path_or_hf_repo="Coidemo/whisper-large-v3-filler-mlx", language="ja", ) ``` ## 訓練設定 - **Base model**: `openai/whisper-large-v3` - **LoRA**: rank=16, alpha=32, dropout=0.05 - **Target modules**: Decoder の self-attention / cross-attention の Q/K/V/O projection - **Frozen**: Encoder 全体 (話者過適合を抑制) - **Dataset**: 日本語ポッドキャスト 1 話者 約 50 分 (124 train chunks / 21 eval chunks、29 秒平均) - **Training**: 10 epochs、batch 2 × grad accum 8 = 実効 batch 16、learning rate 1e-4、warmup ratio 0.1 - **Hardware**: Apple M4 Max 128GB、17 分で完走 訓練データのトランスクリプトは手動修正済み (509 segments 編集、20 skip、1228 保持)。 ## 制限事項 - **話者特化**: 訓練話者 (podcaster「けんすう」氏) のフィラーパターン (「あの」支配的) に過適合。他話者では効果減少 - 「えっと」「えーっと」系フィラーは訓練話者が使わないため、訓練データに現れず改善なし - 日本語以外では効果なし - **hallucination 懸念**: 訓練データに類似した音響パターンで「まあまあまあ…」等のループが稀に発生する。TextffCut の `core.mlx_whisper_refine.transcribe_refined` で境界重複 dedup + hallucination retry を実装済み ## ライセンス [MIT License](https://opensource.org/licenses/MIT) — 継承元: [openai/whisper-large-v3](https://huggingface.co/openai/whisper-large-v3) ## 関連 - **TextffCut**: 本 LoRA を使う動画文字起こし・自動切り抜きツール — https://github.com/Coidemo/TextffCut - **MLX 変換版**: `Coidemo/whisper-large-v3-filler-mlx` ## 引用 このモデルを使用する際は、以下のベース Whisper 論文を引用してください: ```bibtex @article{radford2022whisper, title={Robust Speech Recognition via Large-Scale Weak Supervision}, author={Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya}, journal={arXiv preprint arXiv:2212.04356}, year={2022} } ```