Fixing missing OCR in Spectacle (KDE Plasma 6.6) on Tumbleweed

Hi folks. I’m new to the Chameleon and been embracing it (been loving it until now). Yesterday I updated my distro to get KDE Plasma 6.6 and the thing that I wanted the most: the integrated OCR with Spectacle.

But it wasn’t integrated by default. So I started searching around and found a solution in Fedora’s forum. I wanted to share this if someone is looking to get this feature working right now in Tumbleweed (it’s very probable that they’re gonna add it as a default dependency soon):

  1. You need tesseract, the engine used for OCR by Spectacle (it’s open source and maintained by Google). You can get that by simply running sudo zypper in tesseract-ocr. This installs all the core dependencies for the OCR to work.
  2. If you want support for additional languages you need the trained modules (it only comes with English by default). In my case, I installed the Spanish one: sudo zypper in tesseract-ocr-traineddata-spa
  3. If it doesn’t work, you can debug it by running spectacle in a bash terminal (simply typing spectacle) and it will show exactly what packages it is searching for. In my case, with these steps, it started working immediately.

Do NOT just run sudo zypper in tesseract like I initially did! In the openSUSE repos the package simply named tesseract is actually a 3D First-Person Shooter game, and you’ll end up downloading 250MB of gaming assets instead of the text recognition engine. Make sure to use tesseract-ocr!

3 Likes

Hi, welcome to these forums,

Found out yesterday :slight_smile:

  • In a package manager search for tesseract-ocr and check it for install + the desired languages
  • sudo zypper se tesseract-ocr
    You’ll see a list of tesseract-ocr packages, the app and language packages
  • sudo zypper in tesseract-oce <+desired language packages>
1 Like

sudo zypper in tesseract-ocr <+desired language packages>

tesseract-ocr-traineddata-yor