Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,24 +1,3 @@
|
|
1 |
-
#!/usr/bin/env python3
|
2 |
-
#
|
3 |
-
# Copyright 2022-2023 Xiaomi Corp. (authors: Fangjun Kuang)
|
4 |
-
#
|
5 |
-
# See LICENSE for clarification regarding multiple authors
|
6 |
-
#
|
7 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
# you may not use this file except in compliance with the License.
|
9 |
-
# You may obtain a copy of the License at
|
10 |
-
#
|
11 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
#
|
13 |
-
# Unless required by applicable law or agreed to in writing, software
|
14 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
# See the License for the specific language governing permissions and
|
17 |
-
# limitations under the License.
|
18 |
-
|
19 |
-
# References:
|
20 |
-
# https://gradio.app/docs/#dropdown
|
21 |
-
|
22 |
import os
|
23 |
import time
|
24 |
import uuid
|
@@ -72,38 +51,44 @@ css = """
|
|
72 |
|
73 |
examples = [
|
74 |
[
|
75 |
-
"
|
76 |
-
"csukuangfj/
|
77 |
-
"
|
78 |
0,
|
79 |
1.0,
|
80 |
],
|
81 |
[
|
82 |
-
"
|
83 |
-
"csukuangfj/vits-
|
84 |
-
"
|
85 |
0,
|
86 |
1.0,
|
87 |
],
|
88 |
[
|
89 |
-
"
|
90 |
-
"csukuangfj/vits-
|
91 |
-
|
92 |
0,
|
93 |
1.0,
|
94 |
],
|
95 |
-
["Min-nan (闽南话)", "csukuangfj/vits-mms-nan", "ài piaǸ chiah ē iaN̂", 0, 1.0],
|
96 |
-
["Thai", "csukuangfj/vits-mms-tha", "ฉันรักคุณ", 0, 1.0],
|
97 |
[
|
98 |
-
"
|
99 |
-
"csukuangfj/
|
100 |
-
"
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
1.0,
|
103 |
],
|
104 |
]
|
105 |
|
106 |
|
|
|
107 |
def update_model_dropdown(language: str):
|
108 |
if language in language_to_models:
|
109 |
choices = language_to_models[language]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
import time
|
3 |
import uuid
|
|
|
51 |
|
52 |
examples = [
|
53 |
[
|
54 |
+
"English",
|
55 |
+
"csukuangfj/vits-piper-en_US-john-medium|1 speaker",
|
56 |
+
"Welcome to our next-generation text-to-speech demo powered by Sherpa-ONNX.",
|
57 |
0,
|
58 |
1.0,
|
59 |
],
|
60 |
[
|
61 |
+
"English",
|
62 |
+
"csukuangfj/vits-piper-en_GB-southern_english_male-medium|8 speakers",
|
63 |
+
"This model demonstrates clear British English with a natural male voice.",
|
64 |
0,
|
65 |
1.0,
|
66 |
],
|
67 |
[
|
68 |
+
"English",
|
69 |
+
"csukuangfj/vits-coqui-en-ljspeech|1 speaker",
|
70 |
+
"The quick brown fox jumps over the lazy dog. Numbers: 1234567890.",
|
71 |
0,
|
72 |
1.0,
|
73 |
],
|
|
|
|
|
74 |
[
|
75 |
+
"English",
|
76 |
+
"csukuangfj/vits-piper-en_US-kathleen-low|1 speaker",
|
77 |
+
"Artificial intelligence is transforming industries with voice technologies.",
|
78 |
+
0,
|
79 |
+
1.0,
|
80 |
+
],
|
81 |
+
[
|
82 |
+
"English",
|
83 |
+
"csukuangfj/vits-piper-en_GB-alan-medium|1 speaker",
|
84 |
+
"Today is a perfect day to explore machine learning and natural language processing.",
|
85 |
+
0,
|
86 |
1.0,
|
87 |
],
|
88 |
]
|
89 |
|
90 |
|
91 |
+
|
92 |
def update_model_dropdown(language: str):
|
93 |
if language in language_to_models:
|
94 |
choices = language_to_models[language]
|