0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

whisper の各実装の処理速度を計測する

Last updated at Posted at 2025-08-26

概要

種々音声認識モデルはありますが、比較的多く使われている whisper の各種実装の処理速度を計測します

文字起こしの精度は高いため、特に言及はしません

対象ソフト

環境

  • mac book air
    • sequoia 15.6
    • m3 core 8
    • 24G
  • linux
    • debian 12
    • ryzen 5600x
    • mem DDR4 32G
    • nvidia 3060 12G

実行時の各種条件

  • いずれもパラメータの調整は行わず初期設定で実行する
  • 34秒と30分の音声ファイルを喰わせ、完了までの所要時間を計測する
  • 利用 model は large-v3-turbo とする
  • mac
    • cpu 及び、core ML を使用する
  • linux 端末
    • GPU のみ計測する

参考サイト

細かな解説はこちらのサイトが分かりやすいと思います

結果

実装 34秒のファイル 30分のファイル
faster-whisper + nvidia gpu 3.1秒 57秒
whisper.cpp + nvidia gpu 2.1秒 1分12秒
whisper.cpp + core ML 3.13秒 2分15秒
mlx-whisper 4.1秒 3分22秒
whisper.cpp 4.6秒 5分41秒
faster-whisper 21秒 15分32秒

nvidia GPU CUDA を使用すると最速となりました
apple CPU + core ML の性能の良さも垣間見れました

RTX3060 という古い GPU ですので、50xx のハイエンドを使用するとさらに高速化できるかもしれません

他のCPUとの比較

だいぶ古いCPUだが ryzen 5600X cpu では、11秒の音声ファイルの処理に8秒を要した。
他の CPU でも試行したい。

setup

簡単に setup 方法と参考サイトを記述する

whisper.cpp

setup

git clone https://github.com/ggml-org/whisper.cpp
cd whisper.cpp

sh ./models/download-ggml-model.sh large-v3-turbo

cmake -B build
cmake --build build --config Release

run

./build/bin/whisper-cli -m ./models/ggml-large-v3-turbo.bin -f samples/jfk.wav

whisper.cpp + core ML

以下、不足があるかもしれません

mac setting

  • 最新の mac os へ upate する
    • ここでは macos sequoia 15.6 を想定
  • python 3.12 を install
    • ここでは 3.12 で成功したが、環境により異なるかもしれません
  • xcode install し、以下が表示されると恐らく良い
$  xcode-select -p
/Applications/Xcode.app/Contents/Developer

setup

git clone https://github.com/ggml-org/whisper.cpp
cd whisper.cpp

pip install coremltools
pip install openai-whisper
pip install ane_transformers
pip install torch==2.5.0

./models/generate-coreml-model.sh large-v3-turbo
./models/download-ggml-model.sh large-v3-turbo

cmake -B build -DWHISPER_COREML=1
cmake --build build -j --config Release

run

./build/bin/whisper-cli -m ./models/ggml-large-v3-turbo.bin -f samples/jfk.wav

実行時、以下の表記があれば core ML が有効化されている

whisper_init_state: loading Core ML model from './models/ggml-large-v3-turbo-encoder.mlmodelc'

system_info: n_threads = 4 / 8 | WHISPER : COREML = 1

faster-whisper

debian では cuda install と以下辺りが必要でした

sudo apt install libcudnn9-dev-cuda-13
sudo apt install libcublas-dev-12-9

mlx-whisper

以上となります

余談

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?