Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
1NH21CE024 K. Deepika Reddy
Created September 3, 2024

Improving Indoor Digital Display Accessibility for Visually

Enhance indoor digital displays with screen readers and alternative formats for full accessibility.

29
Improving Indoor Digital Display Accessibility for Visually

Things used in this project

Hardware components

Touchscreen Interfaces
×1
Navigation Switch, 15 V
Navigation Switch, 15 V
×1
Grove - 4-Digit Display
Seeed Studio Grove - 4-Digit Display
×1
Blues Notecard (Cellular)
Blues Notecard (Cellular)
×1
nRF52 Development Kit
Nordic Semiconductor nRF52 Development Kit
×1

Story

Read more

Code

code

Python
# Import necessary libraries
import pyttsx3  # Text-to-Speech conversion library
import tkinter as tk  # GUI library for the display
from tkinter import font

# Initialize TTS engine
engine = pyttsx3.init()

# Set properties for the TTS engine
engine.setProperty('rate', 150)  # Speed of speech
engine.setProperty('volume', 1)  # Volume level (0.0 to 1.0)

# Function to read text aloud
def read_text(text):
    engine.say(text)
    engine.runAndWait()

# Function to handle button click and read the display text
def on_button_click():
    display_text = text_label.cget("text")
    read_text(display_text)

# Create the main window
root = tk.Tk()
root.title("Accessible Digital Display")

# Set font for the display
display_font = font.Font(family="Helvetica", size=20, weight="bold")

# Create a label to display text
text_label = tk.Label(root, text="Welcome to the Accessible Information Display!", font=display_font)
text_label.pack(pady=20)

# Create a button to activate the screen reader
read_button = tk.Button(root, text="Read Aloud", command=on_button_click)
read_button.pack(pady=10)

# Main event loop
root.mainloop()

Credits

1NH21CE024 K. Deepika Reddy

1NH21CE024 K. Deepika Reddy

1 project • 1 follower

Comments