Convert Image to Sound using python | Simple Program | Beginner Project
Convert Image to Sound using python | Simple Program | Beginner Project Download - https://github.com/UB-Mannheim/tesseract/wiki First Install Pytesseract application from above link Install the required modules using PIP while mapping the tesseract.exe check your system Program Files Path Keep your Image File in same directory sample File.txt and sound.mp3 will automatically created in same directory #import modules from PIL import Image from gtts import gTTS import pytesseract import os from new import image_to_sound pytesseract.pytesseract.tesseract_cmd = r "C: \P rogram Files \T esseract-OCR \t esseract.exe" def convert_to_sound ( image ): try : open_image = Image.open(image) text = pytesseract.image_to_string(open_image) text_file = " " .join(text.split( " \n " )) print (text_file) ...