npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tauri-plugin-stt-api

v0.2.2

Published

Speech-to-text recognition API for Tauri with multi-language support

Readme

Tauri Plugin STT (Speech-to-Text)

Cross-platform speech recognition for Tauri 2.x. Desktop targets use whisper.cpp via whisper-rs; mobile delegates to the native OS engine (SFSpeechRecognizer on iOS, SpeechRecognizer on Android).

Highlights

  • One model, 99 languages — Whisper is multilingual; a single GGML model file handles English, Portuguese, Mandarin, and more
  • No separate runtime to installwhisper-rs builds whisper.cpp statically; there is no .so/.dylib to ship
  • Explicit model lifecycle — the host app controls when a model is downloaded; start_listening returns ModelNotInstalled instead of pulling hundreds of MB silently
  • Hardware acceleration — opt-in metal / cuda / vulkan features map to the matching whisper.cpp backend

Platform Matrix

| Platform | Engine | Model | | -------- | ------------------------------------------ | ----- | | iOS | SFSpeechRecognizer (Speech.framework) | OS | | Android | SpeechRecognizer | OS | | macOS | whisper.cpp via whisper-rs (Metal opt.) | GGML | | Windows | whisper.cpp via whisper-rs (CUDA opt.) | GGML | | Linux | whisper.cpp via whisper-rs (Vulkan opt.) | GGML |

Installation

Rust

[dependencies]
tauri-plugin-stt = { version = "0.2", features = ["metal"] }  # macOS
# "cuda" for NVIDIA GPU, "vulkan" for cross-vendor GPU, omit for CPU

TypeScript

npm install tauri-plugin-stt-api

Register the plugin:

fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_stt::init())
        .run(tauri::generate_context!())
        .unwrap();
}

Permissions

{ "permissions": ["stt:default"] }

Model Catalogue

| id | Size | Notes | | ---------- | ------ | ------------- | | tiny | 75 MB | fastest | | base | 142 MB | balanced ⭐ | | small | 466 MB | accurate | | medium | 1.5 GB | very accurate | | large-v3-turbo | 1.6 GB | fast & accurate (advanced) | | large-v3 | 3.0 GB | most accurate |

Files are fetched from HuggingFace (ggerganov/whisper.cpp) and stored under <app_data_dir>/whisper-models/. The active model is persisted to whisper-models/active.txt.

Commands

  • list_models(){ models, active, total_disk_bytes }
  • install_model(id) — downloads and emits stt://download-progress events
  • remove_model(id) — deletes file; clears active marker if needed
  • set_active_model(id) — sets which installed model start_listening loads
  • unload_model() — drops the loaded Whisper context from memory; fails while listening or transcribing
  • start_listening({ language?, max_duration? }) — begins a push-to-talk session
  • stop_listening() — runs Whisper over captured audio and emits a final result
  • is_available()true only when a model is installed and ready
  • get_supported_languages() — curated list of UI-facing locales
  • check_permission() / request_permission() — microphone permission helpers

Events

  • stt://download-progress{ status, modelId, model, progress, downloaded?, total? }
  • stt://result{ transcript, isFinal, confidence }
  • stt://error / plugin:stt:error{ code, message, details? } (codes follow the SttErrorCode union, e.g. NO_SPEECH, AUDIO_ERROR)
  • plugin:stt:stateChange{ state, isAvailable, language } (idle is emitted only after transcription finishes)

Behaviour Notes

  • Whisper is not a streaming recogniser. The plugin buffers audio during recording and runs a single inference pass on stop_listening. The UX is push-to-talk, not live transcription.
  • Audio is captured at the device default rate, downmixed to mono, then decimated to 16 kHz with nearest-neighbour. Whisper is robust enough that a higher-quality resampler makes no measurable difference.
  • Inference uses min(available_parallelism(), 4) threads — beyond that whisper.cpp shows diminishing returns, and we want headroom for the UI.

Mobile

The mobile bridges expose the same JS API surface, but list_models returns an empty list and install_model / remove_model / set_active_model / unload_model are no-ops: the OS engine has no downloadable model concept. Use is_available to gate UI — on iOS/Android it reflects actual recogniser availability.

License

MIT