A very minimalistic approach for an ocrmypdf plugin to use Google Vision as OCR engine. Tesseract is currently used for rotation, so if Tesseract is not able to determine the correct rotation, there are some problems. It doesn't matter for my particular use case, but it might for yours.
A cloudkey is also needed and must be in the same directory as cloudkey.json. https://cloud.google.com/vision/docs/before-you-begin
Also borrowed some code from https://github.com/dinosauria123/gcv2hocr. Thanks a lot for your work.
- copy all files to a directory
- get the cloudkey ans safe it as cloudkey.json
- pip3 install google-cloud-vision
- call ocrmypdf from the currect diretory with --plugin gvision.py