Additional places to find me:
freedmand / textra Goto Github PK
View Code? Open in Web Editor NEWA command-line application to convert images, PDFs, and audio files to text using Apple's APIs
License: MIT License
A command-line application to convert images, PDFs, and audio files to text using Apple's APIs
License: MIT License
Additional places to find me:
It would be very convenient if textra could display the output to STDOUT, via some optional command line argument.
This would make it easier to say, use with python subprocess
to automate running it on images and then capture the text to a string (which we could then use programmatically however one likes.)
It's not hard to work around and just use the file system for this, but it would make it a little easier.
Using VisionKit, there's two main ways to get text from images.
Based on some OCR tests, I'm seeing that the outputs from these two methods are different. Initially, I thought ImageAnalyzer was running VNRequestTextRecognitionLevel.fast because it's for Live Text, but the outputs from ImageAnalyzer are sometimes better than VNRequestTextRecognitionLevel.accurate.
VNRecognizeRequest does have more options, including language correction and custom words.
Do you know what ImageAnalyzer is calling in the background? Is it essentially running VNRecognizeRequest or is it a separate model/pipeline? And this naturally begs the question, which model would be better for OCR? My initial tests show a pretty similar performance in aggregation between ImageAnalyzer and VNRequestTextRecognitionLevel.accurate, but the results per test case can sometimes be highly variable between the two.
For documentation & in case this is outside the scope of your expertise, I've asked the same question on Apple Developers forum here.
Apparently on-device speech recognition is only supported on some Mac devices.
https://support.apple.com/guide/mac-help/if-dictation-on-mac-doesnt-work-as-expected-mchlc480652b/mac:
This issue tracks adding a feature to support speech recognition powered by Apple. Since it would require sending data to Apple's servers, this should not be enabled by default and should require a flag.
Also, the current error: ERROR: Speech recognizer does not support on-device recognition
is not too descriptive. It could be revised to include more context or suggest the proposed flag.
Seems like a great project that would benefit from submission to home-brew?
HEllo,
I get the following error when trying to convert some file. I think it might be because either my system locale is set to Spanish (probably) or because the file that I tried to convert was in Spanish. Any hints? The system should have locale resources installed, or does this recognizer only work when system is set to English?
2023-04-03 15:20:48.276 textra[54391:4225664] Required assets are not available for Locale:es_ES
ERROR: Speech recognizer does not support on-device recognition
I would love if this could recognize and output structured text! Any plans to implement this?
https://developer.apple.com/documentation/vision/structuring_recognized_text_on_a_document
It should potentially identify this issue and respond with either an informative error message or resize the image down before processing it
Textra a mp3 audio file, come across the following mistake:
2023-03-24 13:33:04.515 textra[46484:13310980] Required assets are not available for Locale:en-US
ERROR: Speech recognizer does not support on-device recognition
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.