@remotion/install-whisper-cpp 4.0.136 → 4.0.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/install-whisper-cpp.js +8 -2
- package/dist/transcribe.js +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Caption, convertToCaptions } from './convert-to-captions';
|
|
2
|
-
export {
|
|
2
|
+
export { OnProgress, WhisperModel, downloadWhisperModel, } from './download-whisper-model';
|
|
3
3
|
export { installWhisperCpp } from './install-whisper-cpp';
|
|
4
|
-
export {
|
|
4
|
+
export { TranscriptionJson, transcribe } from './transcribe';
|
|
@@ -33,7 +33,14 @@ const node_stream_1 = require("node:stream");
|
|
|
33
33
|
const promises_1 = require("node:stream/promises");
|
|
34
34
|
const os_1 = __importDefault(require("os"));
|
|
35
35
|
const path_1 = __importDefault(require("path"));
|
|
36
|
+
const getIsSemVer = (str) => {
|
|
37
|
+
return /^[\d]{1}\.[\d]{1,2}\.+/.test(str);
|
|
38
|
+
};
|
|
36
39
|
const installForWindows = async ({ version, to, printOutput, }) => {
|
|
40
|
+
if (!getIsSemVer(version)) {
|
|
41
|
+
throw new Error(`Non-semantic version provided. Only releases of Whisper.cpp are supported on Windows (e.g., 1.5.4). Provided version:
|
|
42
|
+
${version}. See https://www.remotion.dev/docs/install-whisper-cpp/install-whisper-cpp#version for more information.`);
|
|
43
|
+
}
|
|
37
44
|
const url = `https://github.com/ggerganov/whisper.cpp/releases/download/v${version}/whisper-bin-x64.zip`;
|
|
38
45
|
const filePath = path_1.default.join(process.cwd(), 'whisper-bin-x64.zip');
|
|
39
46
|
const fileStream = fs_1.default.createWriteStream(filePath);
|
|
@@ -53,8 +60,7 @@ const installWhisperForUnix = ({ version, to, printOutput, }) => {
|
|
|
53
60
|
(0, node_child_process_1.execSync)(`git clone https://github.com/ggerganov/whisper.cpp.git ${to}`, {
|
|
54
61
|
stdio,
|
|
55
62
|
});
|
|
56
|
-
const
|
|
57
|
-
const ref = isSemVer.test(version) ? `v${version}` : version;
|
|
63
|
+
const ref = getIsSemVer(version) ? `v${version}` : version;
|
|
58
64
|
(0, node_child_process_1.execSync)(`git checkout ${ref}`, {
|
|
59
65
|
stdio,
|
|
60
66
|
cwd: to,
|
package/dist/transcribe.js
CHANGED
|
@@ -57,7 +57,7 @@ const transcribeToTempJSON = async ({ fileToTranscribe, whisperPath, model, tmpJ
|
|
|
57
57
|
'--output-json',
|
|
58
58
|
'--max-len',
|
|
59
59
|
'1',
|
|
60
|
-
'-ojf',
|
|
60
|
+
'-ojf', // Output full JSON
|
|
61
61
|
tokenLevelTimestamps ? ['--dtw', model] : null,
|
|
62
62
|
model ? [`-m`, `${modelPath}`] : null,
|
|
63
63
|
translate ? '-tr' : null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/install-whisper-cpp",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.138",
|
|
4
4
|
"description": "Install helper for Whisper.cpp",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"react-dom": ">=16.8.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@jonny/eslint-config": "3.0.
|
|
24
|
+
"@jonny/eslint-config": "3.0.281",
|
|
25
25
|
"@types/node": "18.14.6",
|
|
26
|
-
"eslint": "8.
|
|
26
|
+
"eslint": "8.56.0",
|
|
27
27
|
"eslint-plugin-10x": "1.5.2",
|
|
28
28
|
"eslint-plugin-react": "7.32.2",
|
|
29
29
|
"eslint-plugin-react-hooks": "4.4.0",
|
|
30
|
-
"prettier": "3.
|
|
30
|
+
"prettier": "3.2.5",
|
|
31
31
|
"prettier-plugin-organize-imports": "3.2.4",
|
|
32
32
|
"vitest": "0.31.1"
|
|
33
33
|
},
|