Update app.py
Browse files
app.py
CHANGED
|
@@ -37,16 +37,36 @@ stops = [
|
|
| 37 |
]
|
| 38 |
|
| 39 |
def change_speed(choice):
|
| 40 |
-
print(f"choice: {choice}")
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
def change_stop(choice):
|
| 44 |
-
print(f"choice: {choice}")
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
def init():
|
| 48 |
key_list=['lb_LU-marylux-medium','lb_LU-femaleLOD-medium','lb_LU-androgynous-medium']
|
| 49 |
-
return(gr.update(label="Voice",choices=key_list,value="lb_LU-
|
| 50 |
|
| 51 |
def new_load_mod(instr="en_US-joe-medium"):
|
| 52 |
model=instr
|
|
|
|
| 37 |
]
|
| 38 |
|
| 39 |
def change_speed(choice):
|
| 40 |
+
# print(f"choice: {choice}")
|
| 41 |
+
if choice=="ganz lues":
|
| 42 |
+
speed=0.2
|
| 43 |
+
elif choice=="lues":
|
| 44 |
+
speed=0.6
|
| 45 |
+
elif choice=="normal":
|
| 46 |
+
speed=1
|
| 47 |
+
elif choice=="schnell":
|
| 48 |
+
speed=1.4
|
| 49 |
+
else: # ganz schnell
|
| 50 |
+
speed=1.8
|
| 51 |
+
return speed
|
| 52 |
|
| 53 |
def change_stop(choice):
|
| 54 |
+
# print(f"choice: {choice}")
|
| 55 |
+
if choice=="ganz kuez":
|
| 56 |
+
stop=0.2
|
| 57 |
+
elif choice=="kuerz":
|
| 58 |
+
stop=0.6
|
| 59 |
+
elif choice=="mëttel":
|
| 60 |
+
stop=1
|
| 61 |
+
elif choice=="laang":
|
| 62 |
+
stop=2.5
|
| 63 |
+
else: # ganz laang
|
| 64 |
+
stop=4
|
| 65 |
+
return stop
|
| 66 |
|
| 67 |
def init():
|
| 68 |
key_list=['lb_LU-marylux-medium','lb_LU-femaleLOD-medium','lb_LU-androgynous-medium']
|
| 69 |
+
return(gr.update(label="Voice",choices=key_list,value="lb_LU-femaleLOD-medium",interactive=True))
|
| 70 |
|
| 71 |
def new_load_mod(instr="en_US-joe-medium"):
|
| 72 |
model=instr
|