Downloads · 30 days
21
8% of all-time downloads
Yvthyvq/Liujgoj-Cantonese-whisper
Liujgoj-Cantonese-whisper is a automatic speech recognition model from Yvthyvq. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
21
8% of all-time downloads
All-time downloads
279
Public
Parameters
72.6M
291 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors290 MB · 98%
From the Hugging Face model README
| 比較指標 | Whisper 轉寫結果 | Omni 轉寫結果 |
|---|---|---|
| 總轉寫樣本數 | 4,742 條 | 4,742 條 |
| 平均文本長度 | 98.93 字元 | 102.50 字元 |
| 平均文本相似度 | 71.25% | 71.25% |
| 混入漢字樣本數 | 827 條 (17.44%) | 10 條 (0.21%) |
| 漢字總字數 | 16,941 字 | 57 字 |
| 重複/死循環現象 | 174 條 (3.67%) | 1 條 (0.02%) |
| 大寫字母總數 | 2,388 個 | 8,656 個 |
本模型係基於 openai/whisper-base 進行微調嘅粵語語音識別(ASR)模型,專門用於將粵語音頻轉換為羅馬字(Liujgoj)。
透過微調,模型學習咗將粵語語音對應到精確嘅羅馬字拼寫,適用於粵語語音轉錄、數據飛輪等場景。
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import librosa
# 載入模型
model = WhisperForConditionalGeneration.from_pretrained("Yvthyvq/Liujgoj-Cantonese-whisper")
processor = WhisperProcessor.from_pretrained("Yvthyvq/Liujgoj-Cantonese-whisper")
def transcribe_audio(audio_path): # 載入音頻(16kHz) audio, sr = librosa.load(audio_path, sr=16000)
# 處理音頻
input_features = processor(
audio,
sampling_rate=sr,
return_tensors="pt"
).input_features
# 生成預測
predicted_ids = model.generate(input_features)
text = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
return text
text = transcribe_audio("your_audio.wav") print(text)
數據量:35,032 條「音頻-羅馬字」配對,共18小時
音頻格式:16kHz 單聲道 WAV
羅馬字系統:Liujgoj(溜歌)
數據來源:粵語電影
項目 數值 基礎模型 openai/whisper-base 訓練框架 Hugging Face Transformers 訓練時長 約 23 分鐘(A800 80GB) Batch Size 4 學習率 1e-5 Epochs 3 優化器 AdamW 精度 bf16
直接輸出羅馬字:
text Waahsvthair cingjciux ge hongjheij cojninx, Dungjtinj ge mauryanx, makjfungj yvxdou munhdeih bingjsoengj. 在 Gongjnaamxgaauj naamx kaaujganh hoirbin yatj tiux daaihlouh zijsoengh, yauq yatjdeoih cingjbinj, saur zapj doujcoengj, ngakjyv catj gaacaux cej, hoeng yvx bakjfongj haangxganr. cinxbinh gor saamjgaa caux cej aaj, muiqgaaj zauh wan zvr yatj go naamxzir, douj haih svjsangj daarbaanh wo.
對應嘅漢字:
text 話説喺清朝嘅康熙初年,冬天嘅某一日,北風如刀,滿地冰霜啊。 喺江南靠近海邊一條大路之上,有一隊清兵,手執刀槍,押住七架囚車,向住北方行緊。 前便嗰三架囚車啊,每架就韞住一個男子,都係書生打扮。
OpenAI 開發 Whisper 模型
Hugging Face 提供 Transformers 框架
所有粵語數據貢獻者