deep-div commited on
Commit
9a6bcbb
·
verified ·
1 Parent(s): d1ed7c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -36
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
- "Chinese (Mandarin, 普通话)",
76
- "csukuangfj/matcha-icefall-zh-baker|1 speaker",
77
- "某某银行的副行长和一些行政领导表示,他们去过长江和长白山; 经济不断增长。2024年12月31号,拨打110或者18920240511。123456块钱。",
78
  0,
79
  1.0,
80
  ],
81
  [
82
- "Chinese (Mandarin, 普通话)",
83
- "csukuangfj/vits-zh-hf-fanchen-wnj|1 speaker",
84
- "在一个阳光明媚的夏天,小马、小羊和小狗它们一块儿在广阔的草地上,嬉戏玩耍,这时小猴来了,还带着它心爱的足球活蹦乱跳地跑前、跑后教小马、小羊、小狗踢足球。",
85
  0,
86
  1.0,
87
  ],
88
  [
89
- "Chinese (Mandarin, 普通话)",
90
- "csukuangfj/vits-zh-hf-fanchen-C|187 speakers",
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
- "Chinese (Mandarin, 普通话)",
99
- "csukuangfj/sherpa-onnx-vits-zh-ll|5 speakers",
100
- "当夜幕降临,星光点点,伴随着微风拂面,我在静谧中感受着时光的流转,思念如涟漪荡漾,梦境如画卷展开,我与自然融为一体,沉静在这片宁静的美丽之中,感受着生命的奇迹与温柔。",
101
- 2,
 
 
 
 
 
 
 
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]