Taiwan-Tongues-ASR-CE-pretrained Model
本模型為 Taiwan-Tongues-ASR-CE 專案所使用的 Automatic Speech Recognition (ASR) 模型,配合對應的語料庫進行預訓練與微調。
📂 模型檔案結構
模型包含以下檔案:
config.json— 模型結構與超參數設定model.bin— 預訓練權重preprocessor_config.json— 音訊前處理設定tokenizer.json— 分詞器設定vocabulary.json— 詞彙表
🛠️ 訓練方法
請參考 Taiwan-Tongues-ASR-CE 專案最新且完整訓練方法及步驟
1. 安裝依賴套件
請先安裝 Python 3.8+ 及以下套件(建議使用虛擬環境):
pip install torch transformers datasets evaluate
2. 準備語料
依照 專案資料集格式 放置語音資料與標註檔案。
- 推薦使用 WebDataset tar 檔 (
train/train-000000.tar...) 搭配 metadata,能更方便地進行流式訓練。 - 也可使用
train.tsv/test.tsv載入,但不建議。
3. 執行訓練腳本
可直接執行 run.sh,或根據需求修改參數:
bash run.sh
主要參數說明:
--model_name_or_path:預訓練模型名稱(如openai/whisper-large-v3,或本模型路徑./)--corpus_data_dir:語料資料夾(如sample_corpus)--dataset_config_name:資料集組合(如train_ds_01+train_ds_02)--language:語言代碼(如zh、nan、hak、en)- 其他參數可參考
run.sh及train_asr.py。
4. 訓練結果
訓練完成後,模型與相關設定會儲存在 output/ 目錄:
output/
├── config.json
├── model.bin
├── preprocessor_config.json
├── tokenizer.json
├── vocabulary.json
📦 已訓練模型
已訓練好的國語、台語、客語、英語模型存放於
models/目錄,包含:model.bin:模型權重config.json、preprocessor_config.json、tokenizer.json、vocabulary.json
這些檔案可以直接放入 Hugging Face transformers 進行推論或微調。
🙌 貢獻與回饋
歡迎研究人員與開發者使用本模型,並透過 Issue 或 Pull Request 回饋改進。
📜 授權
本模型依照 Taiwan-Tongues-ASR-CE 專案授權條款釋出,使用者需遵守相關規範。
- Downloads last month
- 54