摘要 BlackBear-ASR 是 OpenFormosa 社群開源的語音辨識模型。它把臺灣國語和臺語的說話聲音轉成文字,可以一邊聽一邊出字,也能照你的文字指示調整輸出。模型由兩部分組成:一個從零訓練、2.2 億參數的串流聲學編碼器,負責「聽」;以及 OpenFormosa 的 Barbet 語言模型,負責「寫」。在 12 個系統的同場比較中,它是唯一國語、臺語都排進前三的模型。它也有明顯的弱點:很吵的環境、朗讀式國語、整句英語和日語。這篇文章先讓你看、讓你聽,再說明它怎麼運作、做得好和不好的地方。
本文重點
- 一個模型,兩種語言:國語錯誤率 5.28(第 3),臺語 15.62(第 3),臺語夾英文 19.16(第 1)。
- 一邊聽一邊寫:每 0.64 秒更新一次字幕,確定的字平均 1.28 秒後出現,之後不再修改。
- 聽得懂指令:給專有名詞清單、幫別的辨識器改稿、問錄音裡有沒有某個詞,都是同一個模型。
- 弱點寫在前面:噪音和人聲一樣大時,錯誤率從 5.20 升到 14.31,退步比所有對照系統都多。
穩定供水,一直是臺灣面臨的挑戰
先看一分鐘
再聽聽看
下面每一段都是同一個 BlackBear-ASR,只換了一句指令。
國語轉寫 請將這段語音逐字轉寫成文字。
0:00BlackBear-ASR 輸出穩定供水,一直是臺灣面臨的挑戰臺語寫成中文字幕 請將這段臺語語音寫成文字。
0:00BlackBear-ASR 輸出青翠的草地讓人看了很舒服。
(Common Voice 的臺語原文:青翠的草埔,予人看著真爽快)專有名詞 可能出現的詞:明細。
0:00BlackBear-ASR 輸出沒給專有名詞:電子遊戲真的很煩
給了「明細」:電子明細真的很煩問問題 這段音訊有沒有提到「好山好水」?
0:00BlackBear-ASR 輸出有問情緒 說話者的情緒是什麼?
0:00BlackBear-ASR 輸出中性偏正面,帶有欣賞與些許的興奮感。
(情緒描述沒有經過評測,請當作參考)音高 說話者的音高大約多少?
0:00BlackBear-ASR 輸出音高偏高,基頻約 205 Hz。兩人同時講 這段音訊有幾位說話者?有沒有人同時說話?
0:00BlackBear-ASR 輸出兩位說話者,有重疊說話。
(直接轉寫時,兩個人的話會混在一起,這是目前的限制)沒有語音 請將這段語音逐字轉寫成文字。
0:00BlackBear-ASR 輸出(沒有語音)
換一句指令,結果就不同
同一段錄音,給不給專有名詞,寫出來的字就不一樣。按播放聽聽看,再切換上面的按鈕。
請將這段語音逐字轉寫成文字。
電子遊戲真的很煩
它怎麼運作
想像兩個人合作做聽打。
「耳朵」是串流聲學編碼器。它每 0.64 秒把聽到的聲音整理成一小段「聲音筆記」。它只聽已經發生的聲音,不偷看後面,所以可以即時工作。
「筆」是 Barbet 語言模型。它讀這些聲音筆記,再依照你的文字指示寫出結果:要不要標點、哪些專有名詞要寫對、要不要回答問題。
為什麼要這樣分工?因為「筆」看得懂文字。新的用途只要換一句指令,不需要另外訓練一個模型。
看它一邊聽一邊寫
按下播放,字幕會跟著聲音出現。深色的字已經確定,不會再改;淺色的字是模型這一刻的猜測,還可能改變。播完後,模型會把整段重新寫一次,作為最後結果。這些都是模型真實的輸出。
已確定暫定(可能會改)
自己試試看
上傳一段錄音,或直接用麥克風錄,選擇國語或臺語,再選一個功能。錄音只用來產生這次的結果,不會被保存。
正在載入線上試用⋯
模型可能在休眠,第一次喚醒約需 30 秒到 1 分鐘。等太久可以在新分頁打開試用。
做得好的地方
我們把 BlackBear-ASR 和 11 個公開或本土模型放在同一批錄音上比較。數字是錯誤率:每 100 個字錯幾個,越低越好。
錯誤率 %(越低越好):國語、臺語都要聽得懂
臺灣國語(自建,1,000 句)
臺語寫成中文(自建,1,000 句)
同一個模型,換一句指令就能做下面這些事。每一項都註明測試集和筆數。
| 用途 | 結果 | 測試條件 |
|---|---|---|
| 臺語夾英文 | 錯誤率 19.16,第 1;第 2 名 44.01 | 429 句 |
| 國語夾英文、夾日文 | 錯誤率 28.74、29.28 | 各 300 句 |
| 沒有語音時不亂寫 | 100 % 回答「(沒有語音)」;其他系統最好 83.1 % | 480 段環境音 |
| 先給專有名詞清單 | 罕見詞寫對 87.2 % → 98.3 % | 自建國語 239 段、461 個罕見詞 |
| 幫別的辨識器改稿 | Whisper large-v3 草稿 7.47 → 4.33 | 自建國語 250 段 |
| 問有沒有提到某個詞 | 答對 99.2 % | 自建國語,有/沒有各 250 題 |
| 問是什麼語言 | 國語 100 %、臺語 100 % | 自建國語 250 段、臺語 150 段 |
| 問聲音高低 | 和實測音高的相關係數 0.971 | 自建國語 245 段 |
| 不要加標點 | 99.6 % 沒有標點 | 自建國語 250 段 |
| 輸出 JSON | 100 % 可以被程式讀取 | 自建國語 250 段 |
| 即時字幕 | 延遲 1.28 秒;錯誤率 6.52(講完再辨識是 3.64) | Common Voice 國語開發集 100 段 |
| 兩人同時講話 | 可以分成兩行;主講者錯誤率 6.83 | 150 段兩人重疊錄音 |
| 問情緒 | 會回答,但沒有量化驗證,只能當參考 | — |
還不夠好的地方
我們把弱點寫得和優點一樣清楚,方便你判斷適不適合你的用途。
加入噪音後的錯誤率 %(自建國語,300 句)
安靜
噪音和人聲一樣大(0 dB)
| 情況 | 表現 | 建議 |
|---|---|---|
| 朗讀式國語 | Common Voice 9.17(第 8)、FormosaSpeech 11.85(第 9) | 朗讀稿、有聲書可考慮其他系統 |
| 整句英語、日語 | 錯誤率 49.03、44.42(各 500 句) | 請用其他系統 |
| 客語 | 錯誤率 55.91(500 句),實驗功能 | 暫不建議 |
| 自動判斷語言、歌詞 | 實驗功能,這一版沒有量測歌詞 | 暫不建議 |
| 兩人同時講話 | 第二位的錯誤明顯較多 | 重要場合請人工校對 |
| 臺語的寫法 | 輸出是中文字幕,不是臺語漢字或臺羅 | 需要臺語正字時請另外轉換 |
開始使用
只想試試看:打開線上試用,上傳一段錄音。
想在自己的電腦上用,三行就夠:
from blackbear_ice.api import BlackBearASR
asr = BlackBearASR.from_pretrained("OpenFormosa/blackbear-asr")
print(asr.transcribe("audio.wav", language="nan"))
GitHub 上有五篇教學:安裝、基本使用、指令控制、即時字幕與批次、用自己的錄音微調。程式碼和權重都以 Apache 2.0 授權。從 Hugging Face 下載權重前,需要先填寫申請表並同意可接受使用政策,送出後會自動核准。
常見問題
有沒有開源、聽得懂臺語(台語)的語音辨識模型?
有。BlackBear-ASR 是開源的語音辨識模型,同一個模型就能辨識臺灣國語和臺語。在 12 個系統的同場比較中,它的國語錯誤率 5.28、臺語 15.62,兩項都排第 3;臺語夾英文 19.16,排第 1。
可以商用嗎?
可以。程式碼和權重都以 Apache 2.0 授權。從 Hugging Face 下載權重前,要先填申請表並同意可接受使用政策,送出後自動核准。
可以做即時字幕嗎?
可以。模型每 0.64 秒更新一次字幕,確定的字平均 1.28 秒後出現,之後不再修改。即時模式的錯誤率是 6.52,講完再辨識是 3.64。
臺語會寫成什麼字?
臺語會寫成中文字幕,不是臺語漢字或臺羅拼音。需要臺語正字時,請另外轉換。
什麼情況下不建議用?
很吵的環境、朗讀式國語、整句英語或日語、客語。噪音和人聲一樣大時,錯誤率從 5.20 升到 14.31。
數字怎麼來的
所有系統用同一批錄音、同一套計分方式,各自使用官方預設的解碼設定。比對前,雙方都統一轉成繁體、去掉標點、數字轉成中文。國語和臺語測試集是我們自己整理的,錄音沒有出現在訓練資料中。Common Voice、FormosaSpeech、ML2021 是公開資料,任何人都可以重現。模型版本是 R12,每一項只跑一次。
致謝
BlackBear-ASR 屬於 OpenFormosa 社群。感謝 Taipei-1、臺大語音實驗室(NTU Speech Lab)與 NTU SPML Lab 的支持,也謝謝每一位貢獻者。歡迎到 Discord 回報問題、分享使用情境,一起改進它。
Abstract BlackBear-ASR is an open speech recognition model from the OpenFormosa community. It transcribes Taiwanese Mandarin and Taiwanese, writes live captions as you speak, and follows plain-text instructions. A streaming acoustic encoder trained from scratch (220M parameters) listens; OpenFormosa’s Barbet language model writes. Among 12 systems, it is the only one in the top three for both Mandarin and Taiwanese. It also has clear weaknesses: heavy noise, read-aloud Mandarin, and full English or Japanese sentences.
Try it onlineDownload weightsCode on GitHub
穩定供水,一直是臺灣面臨的挑戰
Watch
Try it onlineDownload weightsCode on GitHub
Listen
Mandarin 請將這段語音逐字轉寫成文字。
0:00BlackBear-ASR output穩定供水,一直是臺灣面臨的挑戰
(A stable water supply has always been a challenge for Taiwan.)Taiwanese to Mandarin captions 請將這段臺語語音寫成文字。
0:00BlackBear-ASR output青翠的草地讓人看了很舒服。
(Common Voice Taiwanese text: 青翠的草埔,予人看著真爽快. "The green grass is pleasant to look at.")Hotwords 可能出現的詞:明細。
0:00BlackBear-ASR outputWithout hotwords: 電子遊戲真的很煩
With 「明細」: 電子明細真的很煩Keyword question 這段音訊有沒有提到「好山好水」?
0:00BlackBear-ASR output有 (yes)Emotion 說話者的情緒是什麼?
0:00BlackBear-ASR output中性偏正面,帶有欣賞與些許的興奮感。
(Neutral to positive, appreciative, a little excited. Emotion answers are not evaluated; treat them as hints.)Pitch 說話者的音高大約多少?
0:00BlackBear-ASR output音高偏高,基頻約 205 Hz。
(High pitch, about 205 Hz.)Two speakers 這段音訊有幾位說話者?有沒有人同時說話?
0:00BlackBear-ASR output兩位說話者,有重疊說話。
(Two speakers, overlapping. Plain transcription mixes the two voices; this is a current limitation.)No speech 請將這段語音逐字轉寫成文字。
0:00BlackBear-ASR output(沒有語音)
(no speech)
One instruction changes the output
Same recording, with and without a hotword. Play the clip and switch the buttons.
請將這段語音逐字轉寫成文字。
電子遊戲真的很煩
How it works
The encoder turns every 0.64 s of audio into a short summary and never looks ahead, so it runs live. Barbet reads those summaries together with your instruction and writes the result. A new use needs a new instruction, not a new model.
Watch it write while it listens
Press play. Dark text is committed and never revised; light text is the model’s current guess. When the clip ends, the model rewrites the whole clip once as the final result. All of it is real model output.
CommittedTentative (may change)
Try it yourself
Upload a clip or record one with your microphone, pick Mandarin or Taiwanese, then pick a task. Your recording is used only for this result and is not stored.
Loading the online demo…
The model may be asleep; the first wake-up takes about 30 seconds to a minute. If it takes too long, open the demo in a new tab.
Results
Error rate % (lower is better): Mandarin and Taiwanese
Taiwanese Mandarin (in-house, 1,000)
Taiwanese → Mandarin captions (in-house, 1,000)
| Use | Result | Test set |
|---|---|---|
| Taiwanese with English words | 19.16, 1st; runner-up 44.01 | 429 utterances |
| No speech | 100 % answer “no speech”; best other 83.1 % | 480 clips |
| Hotword list | rare words correct 87.2 % → 98.3 % | in-house Mandarin, 239 clips, 461 words |
| Correcting a Whisper draft | 7.47 → 4.33 | in-house Mandarin, 250 clips |
| Keyword question | 99.2 % correct | 250 yes + 250 no |
| Live captions | 1.28 s latency; 6.52 vs 3.64 offline | Common Voice zh-TW dev, 100 clips |
| No punctuation / JSON | 99.6 % / 100 % valid | in-house Mandarin, 250 clips |
Limitations
Error rate % with added noise (in-house Mandarin, 300)
Clean
Noise as loud as speech (0 dB)
Read-aloud Mandarin ranks 8th (Common Voice 9.17) and 9th (FormosaSpeech 11.85). Full English and Japanese sentences (49.03, 44.42) and Hakka (55.91) are not usable yet. Taiwanese output is written as Mandarin captions, not Taiwanese characters or romanization.
Get started
Code and weights are Apache 2.0. Downloading the weights from Hugging Face requires a short access form, approved automatically. Five step-by-step tutorials are on GitHub.
FAQ
Is there an open speech recognition model for Taiwanese (Taigi)?
Yes. BlackBear-ASR is one open model for both Taiwanese Mandarin and Taiwanese. Among 12 systems on the same recordings, it ranks 3rd on Mandarin (5.28) and 3rd on Taiwanese (15.62), and 1st on Taiwanese mixed with English (19.16).
Can I use it commercially?
Yes. Code and weights are Apache 2.0. Downloading the weights requires a short access form and agreeing to the Acceptable Use Policy; requests are approved automatically.
Does it do live captions?
Yes. Captions update every 0.64 s, and committed text appears after 1.28 s on average. Streaming error rate is 6.52, versus 3.64 offline.
What script does it use for Taiwanese?
Taiwanese speech is written as Mandarin captions, not Taiwanese characters or romanization.
When should I not use it?
Very noisy audio, read-aloud Mandarin, full English or Japanese sentences, and Hakka. At 0 dB noise, its error rate rises from 5.20 to 14.31.
Thanks to Taipei-1, NTU Speech Lab and NTU SPML Lab for their support, and to every contributor.