Skip to content

Commit

Permalink
Update assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Leapward-Koex committed Jan 2, 2025
1 parent 1b0af39 commit e229d5a
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 10 deletions.
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Namida OCR

**Namida OCR** is a completely local OCR browser extension for both **Chrome** and **Firefox**. It enables you to take a “snip” (screenshot) of any part of your current tab, upscale it (either via basic linear upscaling or ESRGAN), and then perform OCR on the snipped region using Tesseract.js. The OCR supports Japanese vertical text at the moment and automatically copies the recognized text to your clipboard, making it easy to use with online dictionaries like [Yomitan](https://github.com/yomidevs/yomitan) or manual translation tools.
**Namida OCR** is a completely local OCR browser extension for both **Chrome**, **Firefox**, and **Edge**. It enables you to take a “snip” (screenshot) of any part of your current tab, upscale it (either via basic linear upscaling or ESRGAN), and then perform OCR on the snipped region using Tesseract.js. The OCR supports Japanese vertical text at the moment and automatically copies the recognized text to your clipboard, making it easy to use with online dictionaries like [Yomitan](https://github.com/yomidevs/yomitan) or manual translation tools. Additionally, Namida OCR includes the option to speak the recognized text aloud using your browser’s text-to-speech capabilities.

## Features

Expand All @@ -18,29 +18,53 @@
- **Clipboard Copy**
Upon successful OCR, the recognized text is automatically copied to your clipboard so you can quickly paste it into a dictionary or translation tool.

- **Text-to-Speech (TTS)**
Namida OCR includes the option to speak the recognized text aloud using your browser’s TTS engine.
- **Chrome**: High-quality remote Japanese voices are included by default.
- **Firefox & Edge (Windows)**: Requires a Japanese language pack with TTS installed.
- **Edge**: Can also use high-quality **“natural”** voices if available via the Windows language pack.

- **Privacy-Friendly**
No internet connection is required during OCR or upscaling. Everything is handled using local models bundled with the extension.
No internet connection is required during OCR, upscaling, or text-to-speech. Everything is handled using local models bundled with the extension.

## Usage

1. **Activate Snip Mode**
Press **Alt + Q** on any web page. A snipping overlay will appear.
Press **Alt + Q** on any web page. A snipping overlay will appear.

2. **Select the Region**
Click and drag to highlight the area you want to OCR.
Click and drag to highlight the area you want to OCR.

3. **Upscale & OCR**
- Namida OCR upscales the snipped region using your chosen method (linear or ESRGAN).
- Tesseract.js then performs OCR on the upscaled image.
- Tesseract.js then performs OCR on the upscaled image.

4. **Copy to Clipboard**
The recognized text is automatically copied to your clipboard. You can then paste it into any dictionary, translation app, or text editor.

5. **Speak the Text** *(Optional)*
If enabled in settings, you can speak the recognized text aloud using your browser’s TTS capabilities. Simply click the "Speak" button in the recognition window.

## Settings

- **Upscaling Mode**
- **Linear** – Uses basic canvas scaling (faster but lower quality).
- **ESRGAN** – AI-based upscaling for sharper text.
- **ESRGAN** – AI-based upscaling for sharper text.

- **Supported Languages**
- Japanese (jpn_vert)
- Japanese (jpn_vert)

- **Enable TTS**
- Option to enable or disable the "Speak" button for recognized text.

- **Preferred TTS Voice**
- Choose which TTS voice to use when speaking recognized text. The available options depend on your browser and system configuration:
- **Chrome**: Includes high-quality remote Japanese voices.
- **Firefox & Edge**: Requires a Japanese language pack with TTS support installed.
- **Edge (Windows)**: Can use advanced **"natura"** voices from the Windows language pack.

## Notes

- For the best experience with TTS on Firefox or Edge, ensure your system has a Japanese language pack with text-to-speech capabilities installed. On Edge, you can access **natural** voices through the Windows settings.
- Namida OCR is ideal for users looking to OCR Japanese text, including vertical text layouts commonly found in manga, visual novels, or other Japanese media.
- All processing is performed locally within the browser, ensuring privacy and offline functionality.
Binary file added assets/Demo Picture.pdn
Binary file not shown.
Binary file modified assets/Demo picture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions assets/Store Text.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Firefox:
Summary:
Namida OCR is a local OCR extension that snips any Japanese (vertical) text on-screen, copies it to your clipboard, and can speak it aloud via installed TTS voices. All processing happens in your browser—no external servers required.
Description:
Namida OCR is a local browser extension for fast, offline text recognition powered by Tesseract.js.
Snip & Recognize: Quickly snip any on-screen region containing Japanese vertical text (or horizontal text), and let Namida OCR handle the rest—no internet connection needed.
Clipboard Copy: Once recognized, text is automatically copied to your clipboard for easy use with dictionaries or other translation tools (like Yomitan).
Optional Voice Synthesis: Have the recognized text spoken aloud using your system’s installed Japanese TTS voices (requires a Japanese language pack on Firefox/Windows).
Privacy-Friendly & Offline: All processing, including optional upscaling (ESRGAN or linear), happens entirely in your browser. No external servers or cloud services.
Usage: Simply press Alt + Q to activate snipping mode, drag to select a region, and watch as Namida OCR extracts and optionally speaks the text.
Ideal for manga, visual novels, or any scenario where you want to quickly extract and optionally listen to Japanese text. Namida OCR keeps everything in-browser and offline, giving you full control over your data.

Chrome:
Summary:
Namida OCR snips any Japanese text on your screen, copies it to your clipboard, and can speak it aloud using Chrome’s high-quality Japanese voices—all entirely in your browser.
Description:
Namida OCR is a local Chrome extension that delivers fast, offline text recognition with Tesseract.js, plus an optional TTS feature for Japanese text.
Snip & OCR: Press Alt + Q to snip any region of the page containing Japanese text (vertical or horizontal).
Clipboard & TTS: The recognized text is automatically copied to your clipboard and can also be spoken aloud using Chrome’s built-in voices, including high-quality remote Japanese voices.
Privacy-Focused: No external servers are used. All OCR and (optional) upscaling happen locally in your browser.
ESRGAN Upscaling: Select ESRGAN for sharper text in challenging images, or opt for faster linear upscaling.
Ideal for manga, visual novels, or any scenario where you want to quickly extract and optionally listen to Japanese text. Namida OCR keeps everything in-browser and offline, giving you full control over your data.

Edge:
Summary:
Namida OCR is a fully local OCR extension for Microsoft Edge, snipping Japanese text on-screen, copying it to your clipboard, and optionally speaking it with Windows TTS voices (including “Natural” voices if installed).
Description:
Namida OCR is a local OCR extension that harnesses Tesseract.js for fast, offline recognition of Japanese text (vertical or horizontal) in Microsoft Edge.
Snip & Copy: Use Alt + Q to capture any region of your screen. The recognized text is copied to your clipboard automatically for easy lookups or translations.
Speak Aloud: Namida OCR can speak the extracted text using Edge’s installed Windows voices—when you have a Japanese language pack or “natura” TTS voices installed.
Offline ESRGAN Upscaling: Improve text clarity with ESRGAN or switch to basic linear upscaling for speed.
No External Servers: All processing takes place locally in your browser. Your data never leaves your device.
Ideal for manga, visual novels, or any scenario where you want to quickly extract and optionally listen to Japanese text. Namida OCR keeps everything in-browser and offline, giving you full control over your data.
8 changes: 5 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ module.exports = (env) => {
{ from: 'node_modules/tesseract.js-core/tesseract-core-lstm.wasm.js', to: 'libs/tesseract-core/tesseract-core-lstm.wasm.js' },
{ from: 'node_modules/tesseract.js-core/tesseract-core-simd-lstm.wasm.js', to: 'libs/tesseract-core/tesseract-core-simd-lstm.wasm.js' },
{ from: 'node_modules/tesseract.js/dist/worker.min.js', to: 'libs/tesseract-worker/worker.min.js' },
{ from: 'lang/', to: 'libs/tesseract-lang/' },
{ from: 'node_modules/@upscalerjs/esrgan-medium/models/', to: 'libs/tensorflow/' },
{ from: 'lang/jpn_vert.traineddata.gz', to: 'libs/tesseract-lang/jpn_vert.traineddata.gz' },
{ from: 'node_modules/@upscalerjs/esrgan-medium/models/x2', to: 'libs/tensorflow/x2' },
{
from: 'assets/', to: 'assets/', globOptions: {
ignore: [
'**/*.pdn'
'**/*.pdn',
'**/*.txt',
'**/Demo picture.png'
]
}
},
Expand Down

0 comments on commit e229d5a

Please sign in to comment.