whisper.rn 0.4.0-rc.6 → 0.4.0-rc.7
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.
|
@@ -115,7 +115,7 @@ public class RNWhisper implements LifecycleEventListener {
|
|
|
115
115
|
promise.resolve(result);
|
|
116
116
|
tasks.remove(this);
|
|
117
117
|
}
|
|
118
|
-
}.
|
|
118
|
+
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
119
119
|
tasks.put(task, "initContext");
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -174,7 +174,7 @@ public class RNWhisper implements LifecycleEventListener {
|
|
|
174
174
|
promise.resolve(data);
|
|
175
175
|
tasks.remove(this);
|
|
176
176
|
}
|
|
177
|
-
}.
|
|
177
|
+
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
178
178
|
tasks.put(task, "transcribeFile-" + id);
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -231,7 +231,7 @@ public class RNWhisper implements LifecycleEventListener {
|
|
|
231
231
|
promise.resolve(null);
|
|
232
232
|
tasks.remove(this);
|
|
233
233
|
}
|
|
234
|
-
}.
|
|
234
|
+
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
235
235
|
tasks.put(task, "abortTranscribe-" + id);
|
|
236
236
|
}
|
|
237
237
|
|
|
@@ -272,7 +272,7 @@ public class RNWhisper implements LifecycleEventListener {
|
|
|
272
272
|
promise.resolve(null);
|
|
273
273
|
tasks.remove(this);
|
|
274
274
|
}
|
|
275
|
-
}.
|
|
275
|
+
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
276
276
|
tasks.put(task, "releaseContext-" + id);
|
|
277
277
|
}
|
|
278
278
|
|
|
@@ -299,7 +299,7 @@ public class RNWhisper implements LifecycleEventListener {
|
|
|
299
299
|
promise.resolve(null);
|
|
300
300
|
tasks.remove(this);
|
|
301
301
|
}
|
|
302
|
-
}.
|
|
302
|
+
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
303
303
|
tasks.put(task, "releaseAllContexts");
|
|
304
304
|
}
|
|
305
305
|
|
package/cpp/rn-whisper.cpp
CHANGED
package/ios/RNWhisperContext.mm
CHANGED
|
@@ -413,7 +413,8 @@ struct rnwhisper_segments_callback_data {
|
|
|
413
413
|
params.new_segment_callback_user_data = &user_data;
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
rnwhisper::job* job = rnwhisper::job_new(jobId, params)
|
|
416
|
+
rnwhisper::job* job = rnwhisper::job_new(jobId, params);
|
|
417
|
+
self->recordState.job = job;
|
|
417
418
|
int code = [self fullTranscribe:job audioData:audioData audioDataCount:audioDataCount];
|
|
418
419
|
rnwhisper::job_remove(jobId);
|
|
419
420
|
self->recordState.isTranscribing = false;
|