@remotion/install-whisper-cpp 4.0.132 → 4.0.134

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.
@@ -81,24 +81,28 @@ const transcribeToTempJSON = async ({ fileToTranscribe, whisperPath, model, tmpJ
81
81
  const onStderr = (data) => {
82
82
  onData(data);
83
83
  if (printOutput) {
84
- console.error(data.toString('utf-8'));
84
+ process.stderr.write(data.toString('utf-8'));
85
85
  }
86
86
  };
87
87
  const onStdout = (data) => {
88
88
  onData(data);
89
89
  if (printOutput) {
90
- console.error(data.toString('utf-8'));
90
+ process.stdout.write(data.toString('utf-8'));
91
91
  }
92
92
  };
93
93
  task.stdout.on('data', onStdout);
94
94
  task.stderr.on('data', onStderr);
95
- task.on('exit', (code) => {
95
+ task.on('exit', (code, signal) => {
96
96
  // Whisper sometimes files also with error code 0
97
97
  // https://github.com/ggerganov/whisper.cpp/pull/1952/files
98
98
  if ((0, node_fs_1.existsSync)(predictedPath)) {
99
99
  resolve(predictedPath);
100
100
  return;
101
101
  }
102
+ if (signal) {
103
+ reject(new Error(`Process was killed with signal ${signal}: ${output}`));
104
+ return;
105
+ }
102
106
  reject(new Error(`No transcription was created (process exited with code ${code}): ${output}`));
103
107
  });
104
108
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/install-whisper-cpp",
3
- "version": "4.0.132",
3
+ "version": "4.0.134",
4
4
  "description": "Install helper for Whisper.cpp",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,