|
|
|
@ -205,6 +205,7 @@ const handleRecognize = ({
@@ -205,6 +205,7 @@ const handleRecognize = ({
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
try { |
|
|
|
|
const progressUpdate = (progress) => { |
|
|
|
|
res.progress({ status: 'initializing api', progress }); |
|
|
|
|
}; |
|
|
|
@ -223,6 +224,9 @@ const handleRecognize = ({
@@ -223,6 +224,9 @@ const handleRecognize = ({
|
|
|
|
|
api.End(); |
|
|
|
|
TessModule._free(ptr); |
|
|
|
|
res.resolve({ files, ...result }); |
|
|
|
|
} catch (err) { |
|
|
|
|
res.reject({ err: err }); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
)) |
|
|
|
|
); |
|
|
|
|