AI Snipping Tool
A Chrome extension that takes custom screenshots, extracts text, and allows users to ask questions from the extracted content.
Step 1:
Take the screenshot
Step 2:
Copy the obtained text or proceed further
Step 3:
Fill Google Gemini API key and ask related question
Prerequisite: Google Gemini API
Sign up at https://ai.google.dev/aistudio
Click on Get API key
👉 Tech Stacks:
⚠️Prerequisites
- Recommended to have the latest version of Google Chrome
- Make sure to switch on Chrome's
developer mode
To get a local copy up and running follow these simple steps
Open Git Bash and change directory
cd path
git clone https://github.com/gitgoap/AI-Snipping-Tool.git
Open Google Chrome
Click 3 dots at top right corner
Go to Extensions> Manage Extensions
Click Load Unpack and select the repo where you saved initially while cloning
Eg: #4
) while raising a Pull Request in the description.We often need to type out text from videos, images, or thumbnails on websites. This can be a tedious and error-prone process, especially if the text is long or has tricky stuff like website links, technical words, code examples, or math equations. This issue comes up on YouTube, where useful info is shown in videos or thumbnail images.
summary
worker.js
listens for user actions, such as clicking the extension's icon or using the context menu.chrome.tabs.captureVisibleTab
and gets the screenshot data as a PNG image.helper.js
, response.js
, elements.js
, and custom-elements.min.js
) into the current tab's context. These scripts are responsible for rendering the OCR result and handling the OCR process.elements.js
, is used to perform the OCR operation. This custom element utilizes the tesseract.js
library, which is a pure JavaScript port of the Tesseract OCR engine.Tesseract OCR: It is an open-source optical character recognition (OCR) engine developed by Google. It is designed to extract text from images and documents without a text layer, outputting the document in various formats such as plain text, HTML, PDF, and more. Tesseract supports recognition of over 100 languages "out of the box" and is highly customizable.
YouTube Video Screenshot: Capture text in the current YouTube video frame with just one click of a popup button.
Download: Users can save screenshots in their local system.
Answers questions just with screenshots: This feature is possible by utilizing the multimodal feature of Google Gemini.