Downloads · 30 days
10
33% of all-time downloads
Yvthyvq/Liujgoj-Cantonese-SenseVoiceSmall
Liujgoj-Cantonese-SenseVoiceSmall is a automatic speech recognition model from Yvthyvq. Use it when you need speech turned into text. The card lists the license as apache-2.0.
本模型為基於 iic/SenseVoiceSmall 微調嘅粵語語音識別 (ASR) 模型,專門優化用於直接轉寫出 溜歌粵語 (Liujgoj Cantonese) 拼音正詞法文本。
Downloads · 30 days
10
33% of all-time downloads
All-time downloads
30
Public
Repo size
937 MB
Likes
1
Public
Click a slice to open those files.
.pt936 MB · 100%
From the Hugging Face model README
本模型為基於 iic/SenseVoiceSmall 微調嘅粵語語音識別 (ASR) 模型,專門優化用於直接轉寫出 溜歌粵語 (Liujgoj Cantonese) 拼音正詞法文本。
喺微調 SenseVoice 轉寫拉丁拼音/自訂標註系統時,如果遇到問題,請注意以下幾點:
處理 CTC Loss NaN 問題:
WARNING: X/16 samples got nan grad. These were ignored for CTC loss.。len(audio_frames) < len(target_tokens) 嘅極短樣本,並確保學習率 (Learning Rate) 設定合理 (建議 2e-4 至 5e-4 配合 Warmup)。標籤開頭帶有 <|woitn|> / you the:
<|woitn|> 等標記。此屬正常現象,推理後用簡單嘅 Regex 或切分邏輯過濾即可。音訊重採樣:
pip install funasr soundfile resampy torch
---
## 推理範例 (Inference Example)
你可以直接使用 FunASR 載入本模型進行推理:
import re
from funasr import AutoModel
# 1. 載入 Hugging Face 模型
model = AutoModel(
model="YourUsername/SenseVoiceSmall-Liujgoj-Cantonese", # 換成你嘅 HF Repo ID
trust_remote_code=True,
disable_update=True
)
# 2. 進行語音識別
res = model.generate(
input="your_test_audio.wav", # 支援 .wav, .mp3, .opus 等格式
cache={},
language="zh",
use_itn=False
)
raw_text = res[0]["text"] if res else ""
# 3. 過濾 SenseVoice 開頭嘅系統標籤,提取純淨 Liujgoj 文本
def clean_liujgoj_text(text):
text = re.sub(r"<\|.*?\|>", "", text)
text = re.sub(r"^(you|the|nospeech|Speech|yue|neutral|zh)\s*", "", text, flags=re.IGNORECASE)
return text.strip()
clean_text = clean_liujgoj_text(raw_text)
print("🎯 轉寫結果 (Liujgoj):", clean_text)
🎯 轉寫 (Liujgoj): you the<|woitn|>waaahsvt ta hair cingjciux ge hongjheij cojninx dgjtinj ge mauxh yatj yath batj fungj yvx douj munqdeih bingjsoengj
🎯 轉寫 (Liujgoj): you the<|woitn|>hair gowongjnaamx kaauganan hoirbinj yatj tiux daaihloouh zijsoengh yauq yatj deoi cingjbingj saurzaap doujcoengj aakj zv catj gaa cauxcej hoeng zvh batkjfongj haangxganr
🎯 轉寫 (Liujgoj): you the<|woitn|>cininxminh gor saamj gaai cauxcej aax muiq gaaj zauh wanr zvh yatj go naamxzir douj haih svjsangj daarbaanh wox
話説喺清朝嘅康熙初年,冬天嘅某一日,北風如刀,滿地冰霜啊。 喺江南靠近海邊一條大路之上,有一隊清兵,手執刀槍,押住七架囚車,向住北方行緊。 前便嗰三架囚車啊,每架就韞住一個男子,都係書生打扮。
📌 【 Epoch 3 Checkpoint 】
🎵 [001_001.opus] -> <|nospeech|> you<|Speech|><|woitn|>waaah svth tair cingjcaux ge hoongjheij coj ninx dgjtinj ge mauxh yat yat batkj funungjyx douj mudeih bingjsoengjax 🎵 [001_002.opus] -> you<|Speech|><|woitn|>haair gogjnaamx caauganan hoibinj yatj tiux daaihlouh zijsoengh yauq yat deoi cingjbingj saurzaap douj coengj gajzv catj gaa cauxcej hoeng zv batjfongj haangxgananr 🎵 [001_003.opus] -> <|nospeech|> you<|Speech|><|woitn|>cininxbinin go saamj gaai cauxcej aax muiq gaa zauh wanr zvh yatj go naamziirr douj haih svjsangj daarbaanh
📌 【 Epoch 4 Checkpoint 】
🎵 [001_001.opus] -> you the<|woitn|>waaah svt tair cingjcaux ge hoongjheij coj ninx dgjtinj ge mauxh yat yath batkj funungjyvx douj mudeih bingjsoengj 🎵 [001_002.opus] -> you the<|woitn|>haair goongjnaamx kaauganan hoibinj yatj tiux daaihloouh zijsoengh yauq yatq deoi cingjbingj saurzaap douj coengj aakj yvth catj gaa cauxcej hoeng zv batjfongj haangxganr 🎵 [001_003.opus] -> you the<|woitn|>cininxbin go saamj gaai cauxcej aax muuirq gaa zauh wanr zvh yatj go naamxziirr douj haih svjsangj daarbaanh
📌 【 Epoch 5 Checkpoint 】
🎵 [001_001.opus] -> you the<|woitn|>waaah svt tair cingjciux ge hoongjheij coj ninx dgjtinj ge mauxh yat yath batkj fungjyx douj mudeih bingjsoengj 🎵 [001_002.opus] -> you the<|woitn|>haair goongjnaamx kaaugann hoirbinj yatj tiux daaihlouh zijsoengh yauq yat deoi cingjbingj saurzaap doujcoengj aakjzvth catj gaa cauxcej hoeng zv batkjfongj haangxganr 🎵 [001_003.opus] -> you the<|woitn|>cininxbinx go saamj gaai cauxcej aax muuq gaa zauh wanr zvh yatj go naamxziirr douj haih svjsangj daarbaanh
📌 【 Epoch 6 Checkpoint 】
🎵 [001_001.opus] -> you the<|woitn|>waah svt tair cingjciux ge hoongjheij coj ninx dgjtinj ge mauxh yat yath batkj fungjyvx douj munqdih bingjsoengj 🎵 [001_002.opus] -> you the<|woitn|>haair gowongjnaamx kaauganh hoirbinj yatj tiux daaihlouh zijsoengh yauq yatj deoi cingjbingj saurzaap douj coengj aakjzv catj gaa cauxcej hoeng zv batkjfongj haangxganr 🎵 [001_003.opus] -> you the<|woitn|>cininxbinh go saamj gaai cauxcej aa muiq gaa zauh wanr zvh yatj go naamzir douj haih svjsangj daarbaanh