openai-whisper-js
Version:
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
18 lines (17 loc) • 907 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var _a, _b;
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = __importDefault(require("path"));
const child_process_1 = require("child_process");
const result = (0, child_process_1.spawnSync)(`${path_1.default.join(__dirname, '../init-python-env.sh')}`, {
shell: '/bin/bash',
});
console.log('INSTALL stdout', (_a = result === null || result === void 0 ? void 0 : result.stdout) === null || _a === void 0 ? void 0 : _a.toString());
console.log('INSTALL stderr', (_b = result === null || result === void 0 ? void 0 : result.stderr) === null || _b === void 0 ? void 0 : _b.toString());
console.log('INSTALL status', result.status);
if (result.status != 0) {
throw new Error('error in installation openai-whisper-js');
}