This script captures a specific region of the active window, extracts text from the screenshot using Tesseract OCR, and converts it to speech using the pyttsx3
library.
- Python 3.x
- Tesseract OCR
- Libraries:
pyttsx3
,PIL
,pytesseract
,cv2
,time
,keyboard
,pygetwindow
- Install Tesseract OCR and set the path in the script.
- Run the script (
python your_script_name.py
). - Press Enter to start capturing and reading the specific region.
- The captured text will be read aloud.
- Adjust the region coordinates (
region_left
,region_top
,region_width
,region_height
) as needed. - Ensure the active window is visible and contains the desired text.
- Customize the text-to-speech rate (
engine.setProperty('rate', 200)
).
Feel free to enhance this README with additional details or instructions specific to your use case. If you have any questions, let me know! 😊