Automatic Speech Recognition
PEFT
Safetensors
Japanese
lora
whisper
speech-to-text
kansai-dialect
japanese
Instructions to use hpscript/whisper-small-kansai-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hpscript/whisper-small-kansai-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForSeq2SeqLM base_model = AutoModelForSeq2SeqLM.from_pretrained("openai/whisper-small") model = PeftModel.from_pretrained(base_model, "hpscript/whisper-small-kansai-lora") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -14,22 +14,23 @@ tags:
|
|
| 14 |
|
| 15 |
# Whisper-Small-Kansai-LoRA
|
| 16 |
|
| 17 |
-
このモデルは、OpenAIの **Whisper Small** をベースに、**関西弁(近畿方言)**に特化してファインチューニングした音声認識(STT)用LoRAモデルです。
|
|
|
|
| 18 |
|
| 19 |
-
## モデルの詳細
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
- **言語:** 日本語 (関西弁)
|
| 24 |
-
- **ベースモデル:** [openai/whisper-small](https://huggingface.co/openai/whisper-small)
|
| 25 |
-
- **学習手法:** PEFT (LoRA)
|
| 26 |
|
| 27 |
-
###
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
```python
|
| 35 |
import torch
|
|
@@ -37,12 +38,8 @@ from transformers import WhisperForConditionalGeneration, WhisperProcessor
|
|
| 37 |
from peft import PeftModel
|
| 38 |
|
| 39 |
base_model_id = "openai/whisper-small"
|
| 40 |
-
lora_model_id = "
|
| 41 |
|
| 42 |
-
# モデルとプロセッサのロード
|
| 43 |
model = WhisperForConditionalGeneration.from_pretrained(base_model_id)
|
| 44 |
model = PeftModel.from_pretrained(model, lora_model_id)
|
| 45 |
-
processor = WhisperProcessor.from_pretrained(base_model_id)
|
| 46 |
-
|
| 47 |
-
# 推論の実行例
|
| 48 |
-
# (pipelineなどを使用して音声を入力してください)
|
|
|
|
| 14 |
|
| 15 |
# Whisper-Small-Kansai-LoRA
|
| 16 |
|
| 17 |
+
[JP] このモデルは、OpenAIの **Whisper Small** をベースに、**関西弁(近畿方言)**に特化してファインチューニングした音声認識(STT)用LoRAモデルです。
|
| 18 |
+
[EN] This is a LoRA adapter for **Whisper Small**, fine-tuned specifically for the **Kansai dialect** (Kinki dialect) of Japanese.
|
| 19 |
|
| 20 |
+
## Model Details / モデルの詳細
|
| 21 |
|
| 22 |
+
### [JP] 特徴
|
| 23 |
+
標準的なWhisperでは標準語に修正されがちな「〜やねん」「〜しはる」といった関西弁特有の表現を、聞こえたままに文字起こしすることを目指しています。
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
### [EN] Features
|
| 26 |
+
While standard Whisper models often "correct" Kansai dialect into standard Japanese, this model aims to transcribe specific Kansai expressions (e.g., "~yanen", "~shiharu") as they are spoken.
|
| 27 |
|
| 28 |
+
- **Developer:** hpscript
|
| 29 |
+
- **Language:** Japanese (Kansai Dialect)
|
| 30 |
+
- **Base Model:** [openai/whisper-small](https://huggingface.co/openai/whisper-small)
|
| 31 |
+
- **Method:** PEFT (LoRA)
|
| 32 |
|
| 33 |
+
## Usage / 使い方
|
| 34 |
|
| 35 |
```python
|
| 36 |
import torch
|
|
|
|
| 38 |
from peft import PeftModel
|
| 39 |
|
| 40 |
base_model_id = "openai/whisper-small"
|
| 41 |
+
lora_model_id = "hpscript/whisper-small-kansai-lora"
|
| 42 |
|
|
|
|
| 43 |
model = WhisperForConditionalGeneration.from_pretrained(base_model_id)
|
| 44 |
model = PeftModel.from_pretrained(model, lora_model_id)
|
| 45 |
+
processor = WhisperProcessor.from_pretrained(base_model_id)
|
|
|
|
|
|
|
|
|