本 repo 為
MediaTek-Research/Breeze-ASR-26 的
whisper.cpp / GGML 量化衍生版本,供需要在端側(macOS / iOS / Android 旗艦機)離線執行臺語 + 國語語音辨識的應用使用。
1# 1) 取得原模型
2git clone https://github.com/openai/whisper
3huggingface-cli download MediaTek-Research/Breeze-ASR-26 --local-dir ./Breeze-ASR-26
4
5# 2) HuggingFace -> GGML(FP16)
6python whisper.cpp/models/convert-h5-to-ggml.py ./Breeze-ASR-26 ./whisper ./out
7mv out/ggml-model.bin out/ggml-breeze-f16.bin
8
9# 3) 量化
10./whisper.cpp/build/bin/whisper-quantize out/ggml-breeze-f16.bin out/ggml-breeze-asr-26-q4_0.bin q4_0
11./whisper.cpp/build/bin/whisper-quantize out/ggml-breeze-f16.bin out/ggml-breeze-asr-26-q5_k.bin q5_k
12./whisper.cpp/build/bin/whisper-quantize out/ggml-breeze-f16.bin out/ggml-breeze-asr-26-q8_0.bin q8_0
1./build/bin/whisper-cli \
2 -m ./ggml-breeze-asr-26-q5_k.bin \
3 -f ./your_audio.wav \
4 -l zh \
5 -nt
1from whisper_cpp_python import Whisper
2
3w = Whisper(model_path="./ggml-breeze-asr-26-q5_k.bin")
4result = w.transcribe(audio_path="./your_audio.wav", language="zh")
5print(result["text"])
1import 'package:whisper_flutter_new/whisper_flutter_new.dart';
2
3final whisper = Whisper(model: WhisperModel.custom(
4 path: '/path/to/ggml-breeze-asr-26-q5_k.bin',
5));
6
7final result = await whisper.transcribe(
8 transcribeRequest: TranscribeRequest(
9 audio: '/path/to/your_audio.wav',
10 language: 'zh',
11 isTranslate: false,
12 ),
13);
14
15print(result.text);
不在白名單的機器(如 Pixel 4),可裝 Q4_0 但推論時間會明顯較長(Pixel 4 / Snapdragon 855 實測 30 秒音訊約 68 秒)。如果需要即時體驗,建議使用 Server-side 推論(
MediaTek-Research/Breeze-ASR-26 原模型 + faster-whisper)。
本 repo 內的 GGML 量化衍生模型沿用基底模型的
Apache License 2.0。
1@misc{mediatek2026breezeasr26,
2 title = {Breeze-ASR-26: A Whisper-large-v2 fine-tune for Taigi, Mandarin, and code-switching ASR},
3 author = {MediaTek Research},
4 year = {2026},
5 url = {https://huggingface.co/MediaTek-Research/Breeze-ASR-26}
6}