forked from CristiVlad25/misc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ivona5.py
35 lines (26 loc) · 843 Bytes
/
ivona5.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from tkinter import *
from tkinter import ttk
from tkinter import scrolledtext
from threading import Thread
import pyvona
from keys import *
root = Tk()
root.resizable(0,0)
root.title('Ivona Speech Synthesizer')
img = PhotoImage(file='c:\\users\\cristi\\desktop\\speakb2.png')
def callback():
v.speak(entry.get('1.0', END))
entry.delete('1.0', END)
def thr():
t1 = Thread(target=callback)
t1.start()
entry = scrolledtext.ScrolledText(root, width=30, height=10, wrap=WORD,
background='#a6f4e7', font='helvetica 12')
entry.grid(row=0, column=0)
button = Button(root, image=img, command=thr, bd=0, overrelief='sunken')
button.grid(row=0, column=1, sticky=N)
#v = pyvona.create_voice('key1', 'key2')
v = pyvona.create_voice(key1, key2)
v.voice_name = 'Emma'
entry.focus()
root.mainloop()