whisper.rn  by mybigday

React Native binding for high-performance local speech recognition

Created 2 years ago
615 stars

Top 53.5% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides React Native bindings for whisper.cpp, enabling high-performance speech-to-text inference directly within mobile applications. It targets React Native developers seeking to integrate advanced Automatic Speech Recognition (ASR) capabilities, offering both file-based and real-time transcription.

How It Works

The library leverages whisper.cpp's C++ core for efficient Whisper model execution. It exposes JavaScript APIs for initializing the Whisper context with model files and performing transcription tasks. For iOS, it supports leveraging Core ML for hardware-accelerated inference, falling back to the GGML model if necessary.

Quick Start & Requirements

  • Install: npm install whisper.rn
  • iOS: Run npx pod-install. Extended Virtual Addressing recommended for medium/large models. Microphone permission required for real-time transcription.
  • Android: Add Proguard rule if enabled. NDK version 24.0.8215888+ recommended. Microphone permission required for real-time transcription.
  • Expo: Requires prebuilding.
  • Docs: https://github.com/mybigday/whisper.rn

Highlighted Details

  • Supports both file-based and real-time audio transcription.
  • Integrates Core ML for optimized iOS performance.
  • Allows bundling model and audio files as assets (requires Metro config modification).
  • Provides utilities for managing iOS Audio Sessions.

Maintenance & Community

  • Built and maintained by BRICKS.
  • Contributing guide available.

Licensing & Compatibility

  • MIT License. Permissive for commercial use and closed-source linking.

Limitations & Caveats

Bundling large models as assets can significantly increase app size; quantized models are recommended for the RN packager due to file size limits. Core ML models are separate assets that need to be managed. Real-time transcription on tvOS is not supported.

Health Check
Last Commit

3 days ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
10
Star History
14 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Travis Fischer Travis Fischer(Founder of Agentic).

RealtimeSTT by KoljaB

0.5%
9k
Speech-to-text library for realtime applications
Created 2 years ago
Updated 2 months ago
Feedback? Help us improve.