
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
openai-whisper-js
Advanced tools
openai-whisper-js is a Node.js wrapper for the OpenAI Whisper library, enabling seamless audio transcription using Whisper models. This package simplifies the process of interacting with Whisper by providing a JavaScript interface to execute transcription
openai-whisper-js
is a Node.js wrapper for the OpenAI Whisper library, enabling seamless audio transcription using Whisper models. This package simplifies the process of interacting with Whisper by providing a JavaScript interface to execute transcriptions.
tiny
, base
, small
, medium
, large
, turbo
, large-v3
).First, install the package:
npm install openai-whisper-js
/bin/bash
) available.ffmpeg
is installed for audio processing, as required by Whisper.import path from 'path';
import { whisper } from 'openai-whisper-js';
async function transcribeAudio() {
try {
const result = await whisper.transcribe({
modelName: 'tiny',
audio: path.join(__dirname, './audio/test.mp3'),
// debug: true, // Uncomment for detailed logs
});
console.log('Transcription Result:', result);
} catch (error) {
console.error('Error during transcription:', error);
}
}
transcribeAudio();
whisper.transcribe(options: ITranscribeOptions): Promise<string>
Transcribes an audio file using the specified Whisper model.
modelName
(required): Whisper model to use. Supported values: 'tiny' | 'base' | 'small' | 'medium' | 'large' | 'turbo' | 'large-v3'
.audio
(required): Path to the audio file for transcription.debug
(optional): Boolean flag for enabling debug mode. Default: false
.A Promise<string>
resolving to the transcription text.
You can extend the transcription options by modifying the output format or directory:
await whisper.transcribe({
modelName: 'base',
audio: path.join(__dirname, './audio/test.mp3'),
debug: true,
});
Contributions are welcome! Please open an issue or submit a pull request to improve the package.
This project is licensed under the MIT License. See the LICENSE file for details.
For issues or feature requests, visit the GitHub repository.
Developed by Ahmed Adel.
FAQs
openai-whisper-js is a Node.js wrapper for the OpenAI Whisper library, enabling seamless audio transcription using Whisper models. This package simplifies the process of interacting with Whisper by providing a JavaScript interface to execute transcription
We found that openai-whisper-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.