vosk-browser  by ccoreilly

Speech recognition for the browser

Created 4 years ago
488 stars

Top 63.2% on SourcePulse

GitHubView on GitHub
Project Summary

Vosk-Browser is a JavaScript library that enables speech recognition directly within web browsers by leveraging a WebAssembly build of the Vosk speech recognition toolkit. It is designed for web developers who want to integrate real-time speech-to-text capabilities into their applications without relying on server-side processing. The library offers an easy-to-use API for handling microphone input and audio files, supporting multiple languages.

How It Works

This library utilizes a WebAssembly compilation of Vosk, specifically configured to run within a Web Worker. This approach offloads the computationally intensive speech recognition tasks from the main browser thread, preventing UI freezes and ensuring a smooth user experience. The library handles the complexities of Web Worker communication and audio processing, providing a straightforward interface for developers to interact with the Vosk engine.

Quick Start & Requirements

  • Installation: Install via npm: npm i vosk-browser. Alternatively, use a CDN like jsDelivr.
  • Prerequisites: None explicitly mentioned beyond a modern web browser.
  • Usage: Load the library and initialize Vosk with a model (e.g., model.tar.gz). The provided example demonstrates capturing microphone input and processing it for speech recognition.
  • Demo: A live demo is available at https://ccoreilly.github.io/vosk-browser/.

Highlighted Details

  • Supports 13 languages for speech recognition.
  • Designed to run speech recognition within a Web Worker for non-blocking performance.
  • Includes examples for microphone input and audio file processing.

Maintenance & Community

  • The project appears to be maintained by ccoreilly.
  • A "Todos" section in the README indicates planned improvements such as automated publishing and better documentation.

Licensing & Compatibility

  • The license is not explicitly stated in the provided README.

Limitations & Caveats

  • The README mentions a "somewhat opinionated" approach, which might imply certain design choices that could limit flexibility for some use cases.
  • The project is still marked with "Todos" for testing and documentation, suggesting it may not be fully production-ready or stable.
Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
12 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.