Downloads · 30 days
6
14% of all-time downloads
ketman/whisper_for_dominion
whisper_for_dominion is a automatic speech recognition model from ketman. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as mit.
Whisperでドミニオン(ボードゲーム)のカード用語などを含んだ音声を文字起こし出来ることを目標にチューニングされたLLMです。<br open-ai/largeモデルをベースにファインチューニングすることで生成されています。<br 2023/12/19時点、全てのカードを学習済み。通常のlargeモデルと比較して適切に出力される様子が確認できると思います。<br
Downloads · 30 days
6
14% of all-time downloads
All-time downloads
44
Public
Parameters
1.5B
18.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
Whisperでドミニオン(ボードゲーム)のカード用語などを含んだ音声を文字起こし出来ることを目標にチューニングされたLLMです。<br> open-ai/largeモデルをベースにファインチューニングすることで生成されています。<br> 2023/12/19時点、全てのカードを学習済み。通常のlargeモデルと比較して適切に出力される様子が確認できると思います。<br>
※認識しにくい語の例
from faster_whisper import WhisperModel
from transformers import WhisperForConditionalGeneration, WhisperProcessor
from datasets import load_dataset, DatasetDict, Dataset
from datasets import Audio
MODEL_PATH = "trained_model" # ローカルにダウンロードしたketman/whisper_for_dominionの入ったフォルダ
fileList = ["out_4315_1.wav","out_4369_1.wav","out_4436_1.wav","out_4494_1.wav","out_4557_1.wav"]
processor = WhisperProcessor.from_pretrained("openai/whisper-large", language="Japanese", task="transcribe")
# チューニング済モデルを定義
model = WhisperForConditionalGeneration.from_pretrained(MODEL_PATH)
model.config.forced_decoder_ids = processor.get_decoder_prompt_ids(language = "ja", task = "transcribe")
model.config.suppress_tokens = []
# Dataset準備
common_voice = DatasetDict()
common_voice["train"] = Dataset.from_dict({"audio": fileList}).cast_column("audio", Audio(sampling_rate=16000))
# Whisper実行(transcription)
for i in range(len(common_voice["train"])):
inputs = processor(common_voice["train"][i]["audio"]["array"], return_tensors="pt")
input_features = inputs.input_features
generated_ids = model.generate(inputs=input_features)
transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(transcription)
自作データセットでWhisperをファインチューニングしたら、独自用語だらけのクラロワ実況でも使えるようになった:「ファインチューニング編」