Back to Whisper Cpp

whisper.cpp : WASM example

examples/whisper.wasm/index-tmpl.html

1.8.42.0 KB
Original Source

Minimal whisper.cpp example running fully in the browser

Usage instructions:

  • Load a ggml model file (you can obtain one from here, recommended: tiny or base )
  • Select audio file to transcribe or record audio from the microphone (sample: jfk.wav)
  • Click on the "Transcribe" button to start the transcription

Note that the computation is quite heavy and may take a few seconds to complete.
The transcription results will be displayed in the text area below.

Important:

  • your browser must support WASM SIMD instructions for this to work
  • Firefox cannot load files larger than 256 MB - use Chrome instead

More examples: bench | stream | command | wchess |


Whisper models:

tiny.en (75 MB)tiny (75 MB)base.en (142 MB)base (142 MB)small.en (466 MB)small (466 MB)

Quantized models:

tiny.en (Q5_1, 31 MB)tiny (Q5_1, 31 MB)base.en (Q5_1, 57 MB)base (Q5_1, 57 MB)small.en (Q5_1, 182 MB)small (Q5_1, 182 MB)
medium.en (Q5_0, 515 MB)medium (Q5_0, 515 MB)large (Q5_0, 1030 MB)

Input: File Microphone

Audio file:

Microphone: StartStop

0%

Your browser does not support the <audio> tag.


| Language: EnglishArabicArmenianAzerbaijaniBasqueBelarusianBengaliBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKannadaKoreanLatinLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTamilTeluguThaiTurkishUkrainianUrduVietnameseWelshYiddish | Threads: 8 | Transcribe | Translate |

| Build time: @GIT_DATE@ | Commit hash: @GIT_SHA1@ | Commit subject: @GIT_COMMIT_SUBJECT@ | Source Code |