Discover and explore top open-source AI tools and projects—updated daily.
React hook for OpenAI Whisper API with speech recorder
Top 44.9% on SourcePulse
This React hook simplifies integrating OpenAI's Whisper API into web applications, offering built-in speech recording, real-time transcription, and silence removal. It targets React developers seeking to add voice input and transcription capabilities to their projects, providing a convenient abstraction over complex audio processing and API interactions.
How It Works
The hook leverages browser Web Audio APIs for recording and integrates libraries like recordrtc
for cross-browser compatibility and lamejs
for MP3 encoding. For silence removal, it utilizes @ffmpeg/ffmpeg
. The core functionality involves capturing audio, optionally processing it (silence removal), and sending it to the OpenAI Whisper API for transcription. It supports both direct API calls and custom server integration for enhanced security and control.
Quick Start & Requirements
npm i @chengsokdara/use-whisper
or yarn add @chengsokdara/use-whisper
Highlighted Details
timeSlice
.nonStop
recording option with stopTimeout
.language
, response_format
, temperature
, prompt
).onTranscribe
callback).Maintenance & Community
The project is actively developed by chengsokdara, with a roadmap including React Native support. Contact information for development services is provided.
Licensing & Compatibility
The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The project is primarily focused on web applications; React Native support is under development. The lack of an explicit license may pose a risk for commercial adoption.
1 year ago
Inactive