JSPM

  • Created
  • Published
  • Downloads 402
  • Score
    100M100P100Q89217F
  • License MIT

Node.js bindings for OpenAI's Whisper. Optimized for CPU.

Package Exports

  • @pr0gramm/fluester
  • @pr0gramm/fluester/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@pr0gramm/fluester) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fluester – [ˈflʏstɐ] CI CD version downloads

License

Node.js bindings for OpenAI's Whisper. Hard-fork of whisper-node.

Features

  • Output transcripts to JSON (also .txt .srt .vtt)
  • Optimized for CPU (Including Apple Silicon ARM)
  • Timestamp precision to single word

Installation

Requirements

  • make and everything else listed as required to compile whisper.cpp
  • Node.js >= 20
  1. Add dependency to project
npm install @pr0gramm/fluester
  1. Download whisper model of choice
npx --package @pr0gramm/fluester download-whisper
  1. Compile whisper.cpp if you don't want to provide you own version:
npx --package @pr0gramm/fluester compile-whisper

Usage

import { createWhisperClient } from "@pr0gramm/fluester";

const client = createWhisperClient();

const transcript = await client.translate("example/sample.wav");

console.log(transcript); // output: [ {start,end,speech} ]

Output (JSON)

[
  {
    "start": "00:00:14.310", // time stamp begin
    "end": "00:00:16.480", // time stamp end
    "speech": "howdy" // transcription
  }
]

Usage with Additional Options

import whisper from "@pr0gramm/fluester";

const filePath = "example/sample.wav", // required

const options = {
  modelName: "tiny.en", // default
  modelPath: "/custom/path/to/model.bin", // use model in a custom directory
  whisperOptions: {
    generateTxt: false, // outputs .txt file
    generateSubtitles: false, // outputs .srt file
    generateVtt: false, // outputs .vtt file
    timestampSize: 10, // amount of dialogue per timestamp pair
    wordTimestamps: true // timestamp for every word
  }
}

const transcript = await whisper(filePath, options);

Made with

Roadmap

  • Nothing ¯\_(ツ)_/¯