Giter Site home page Giter Site logo

img_txt_read's Introduction

Certainly! Here's a clear and concise README file for your project:


Text Detection and Speech Conversion Project

This project leverages OpenCV, EasyOCR, and Google's Text-to-Speech (gTTS) to read and annotate text from an image and convert detected text to speech. The recognized text is highlighted in the original image, and the extracted text is saved as an audio file.

Features

  • Text Detection: Detects text from an input image using EasyOCR.
  • Text Annotation: Highlights detected text with bounding boxes and labels it with the recognized text.
  • Text-to-Speech Conversion: Converts all detected text to an audio file using gTTS.

Prerequisites

Before running the project, ensure you have the following installed:

  • Python 3.6+
  • OpenCV (opencv-python)
  • EasyOCR
  • matplotlib
  • gTTS

You can install the required libraries with:

pip install opencv-python easyocr matplotlib gtts

Usage

  1. Prepare Your Image: Place your target image in a known directory and set its path in the image_path variable within the script.

  2. Run the Script: Execute the script to detect and annotate text, then save it as an audio file.

python text_detection_to_speech.py
  1. Output:
    • Annotated Image: Displays the image with highlighted text.
    • Audio File: Generates an audio file (output_audio.mp3) containing the detected text.

Configuration

  • Confidence Threshold: The confidence threshold for accepting recognized text can be adjusted using the threshold variable.
  • Language Support: EasyOCR supports multiple languages. Modify the language list in easyocr.Reader as needed.

Example Output

When you run the script, you will see an annotated image showing the detected text and an audio file containing the recognized content.

Let me know if you'd like to add more information or details!

img_txt_read's People

Contributors

arpansethi30 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.