GUIZERO andnfrom threading import Thread import pyttsx3 engine = pyttsx3.inithreading - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: GUIZERO andnfrom threading import Thread import pyttsx3 engine = pyttsx3.inithreading (/thread-13896.html) |
GUIZERO andnfrom threading import Thread import pyttsx3 engine = pyttsx3.inithreading - subhankar2028 - Nov-05-2018 from threading import Thread import pyttsx3 engine = pyttsx3.init() from guizero import App, TextBox, PushButton, Text, alerts,Slider from tkinter.font import Font def voice_speed(slider_value): r=slider_value print(r) def voice_volume(slider_value): v=slider_value print(v) def go(): while True: #print(slider_r.value) print(slider_v.value) engine.setProperty('rate',slider_r.value) engine.setProperty('volume',slider_v.value) engine.say(textbox.value) engine.runAndWait() app = App() slider_r = Slider(app, command=voice_speed) slider_v = Slider(app, command=voice_volume) text = Text(app, text="Enter your name") textbox = TextBox(app) button = PushButton(app, text="Start", command=go) app.display()I am trying to create a simple GUI app to convert text to speech. I don't have clear knowledge on parallel programming or threading in pythonn. So please help me to achieve my goal. Here i want to start and stop voice play by pressing a push button and vary the volume and word rate by scroll bar. |