🚀 ホイスパー大規模モデルのマージモデル
TIESメソッドを用いてマージされた、ロシア語音声認識用のモデルです。
🚀 クイックスタート
新しいバージョンが利用可能です: Apel-sin/whisper-large-v3-russian-ties-podlodka-v1.2
📚 ドキュメント
モデル詳細
このモデルはTIESマージ手法を使用してマージされました。
method: ties
parameters:
ties_density: 0.85
encoder_weights:
- 0.65
- 0.35
decoder_weights:
- 0.6
- 0.4
models:
model_a: "/mnt/cloud/llm/whisper/whisper-large-v3-russian"
model_b: "/mnt/cloud/llm/whisper/whisper-large-v3-ru-podlodka"
output_dir: "/mnt/cloud/llm/whisper/whisper-large-v3-russian-ties-podlodka"
シンプルなAPIサーバ
このモデルは、シンプルなOpenAI互換APIサーバと共に使用できます: https://github.com/kreolsky/whisper-api-server/
使用方法
電話通話を処理する場合、音声認識(ASR)を行う前にレコードを前処理し、音量を調整することを強くおすすめします。例えば、次のようにします。
sox record.wav -r 8000 record-normalized.wav norm -0.5 compand 0.3,1 -90,-90,-70,-50,-40,-15,0,0 -7 0 0.15
次に、ASRコードは次のようになります。
import torch
from transformers import WhisperForConditionalGeneration, WhisperProcessor, pipeline
torch_dtype = torch.bfloat16
device = 'cpu'
if torch.cuda.is_available():
device = 'cuda'
elif torch.backends.mps.is_available():
device = 'mps'
setattr(torch.distributed, "is_initialized", lambda : False)
device = torch.device(device)
whisper = WhisperForConditionalGeneration.from_pretrained(
"antony66/whisper-large-v3-russian", torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True,
)
processor = WhisperProcessor.from_pretrained("antony66/whisper-large-v3-russian")
asr_pipeline = pipeline(
"automatic-speech-recognition",
model=whisper,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
max_new_tokens=256,
chunk_length_s=30,
batch_size=16,
return_timestamps=True,
torch_dtype=torch_dtype,
device=device,
)
from io import BufferIO
wav = BytesIO()
with open('record-normalized.wav', 'rb') as f:
wav.write(f.read())
wav.seek(0)
asr = asr_pipeline(wav, generate_kwargs={"language": "russian", "max_new_tokens": 256}, return_timestamps=False)
print(asr['text'])
進行中の作業
このモデルは現在開発中です。目標は、電話通話の音声認識にできるだけ適したようにファインチューニングすることです。もし貢献したい場合や、良いデータセットを持っている場合は、ぜひ教えてください。あなたの支援を大いに歓迎します。
モデル情報
属性 |
詳情 |
ベースモデル |
antony66/whisper-large-v3-russian、bond005/whisper-large-v3-ru-podlodka |
言語 |
ru |
ライブラリ名 |
transformers |
タグ |
asr、whisper、russian、mergekit、merge |
データセット |
mozilla-foundation/common_voice_17_0、bond005/taiga_speech_v2、bond005/podlodka_speech、bond005/rulibrispeech |
評価指標 |
wer |