Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
node-whisper
Advanced tools
A binding for OpenAI's Whisper Speech-to-Text system, supporting async operations.
node-whisper is a powerful and straightforward TypeScript package that provides seamless integration with OpenAI's Whisper Speech-to-Text system. If you're looking to harness the incredible capabilities of Whisper for your projects, you're in the right place.
Make sure you've got your foundation set by following the instructions laid out in the OpenAI Whisper repository. Once you've completed those steps, you're ready to dive in.
To add node-whisper to your project, simply run:
npm install node-whisper
Or with yarn
yarn add node-whisper
import whisper from 'node-whisper';
async function transcribeAudio() {
try {
const audioFilePath = 'path_to_your_audio_file.wav';
const data = await whisper(audioFilePath, {
output_format: 'all',
output_dir: 'subtitles',
});
console.log('Transcriptions:', data); // all the selected files paths (default: json, tsv, srt, txt, vtt)
const JSONcontent = await data.json.getContent();
console.log(JSONcontent); // the content of the file
// or if you provide all output_format and you want to read them all at once
const contents = await whisper.readAllFiles(data);
console.log(contents); // all the returned files parsed
} catch (error) {
console.error('Error:', error.message);
}
}
transcribeAudio();
Async Support: Embrace the asynchronous nature of modern JavaScript and take full advantage of async/await when interacting with Whisper.
Comprehensive Options: All of Whisper's configuration options are supported, giving you fine-grained control over your Speech-to-Text tasks.
Typescript Support: Enjoy the benefits of static typing and enhanced code readability when working with node-whisper in TypeScript with both esm and cjs modules.
No dependencies.
Happy coding!
FAQs
A binding for OpenAI's Whisper Speech-to-Text system, supporting async operations.
We found that node-whisper 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.