Spaces:
Runtime error
Runtime error
kritias
commited on
Commit
•
37d44c1
1
Parent(s):
c9f57e4
Feat : Bug Fix and Random Initial Value
Browse files- app.py +4 -0
- src/__pycache__/attentions.cpython-38.pyc +0 -0
- src/__pycache__/commons.cpython-38.pyc +0 -0
- src/__pycache__/models.cpython-38.pyc +0 -0
- src/__pycache__/modules.cpython-38.pyc +0 -0
- src/__pycache__/transforms.cpython-38.pyc +0 -0
- src/__pycache__/utils.cpython-38.pyc +0 -0
- src/monotonic_align/__pycache__/__init__.cpython-38.pyc +0 -0
- src/monotonic_align/__pycache__/core.cpython-38.pyc +0 -0
- src/text/__pycache__/__init__.cpython-38.pyc +0 -0
- src/text/__pycache__/cleaners.cpython-38.pyc +0 -0
- src/text/__pycache__/japanese.cpython-38.pyc +0 -0
- src/text/cleaners.py +1 -1
app.py
CHANGED
@@ -9,9 +9,11 @@ from src import commons, utils
|
|
9 |
import gradio as gr
|
10 |
from src.models import SynthesizerTrn
|
11 |
from src.text import text_to_sequence, _clean_text
|
|
|
12 |
|
13 |
limitation = os.getenv("SYSTEM") == "spaces" # limit text and audio length in huggingface spaces
|
14 |
|
|
|
15 |
|
16 |
def get_text(text, hps, is_phoneme):
|
17 |
text_norm = text_to_sequence(text, hps.symbols, [] if is_phoneme else hps.data.text_cleaners)
|
@@ -91,6 +93,8 @@ if __name__ == '__main__':
|
|
91 |
model.eval()
|
92 |
speaker_ids = [0]
|
93 |
speakers = [name]
|
|
|
|
|
94 |
|
95 |
t = 'vits'
|
96 |
models_tts.append((name, cover_path, speakers, lang, example,
|
|
|
9 |
import gradio as gr
|
10 |
from src.models import SynthesizerTrn
|
11 |
from src.text import text_to_sequence, _clean_text
|
12 |
+
import random
|
13 |
|
14 |
limitation = os.getenv("SYSTEM") == "spaces" # limit text and audio length in huggingface spaces
|
15 |
|
16 |
+
initial_values = ['こういう時には悪くありませんね。','本当に少しだけですからね?','次はもう、絶対に手伝いません!', 'ブルーアーカ通り、完璧!']
|
17 |
|
18 |
def get_text(text, hps, is_phoneme):
|
19 |
text_norm = text_to_sequence(text, hps.symbols, [] if is_phoneme else hps.data.text_cleaners)
|
|
|
93 |
model.eval()
|
94 |
speaker_ids = [0]
|
95 |
speakers = [name]
|
96 |
+
initial_seed = random.randint(0, 3)
|
97 |
+
example = initial_values[initial_seed]
|
98 |
|
99 |
t = 'vits'
|
100 |
models_tts.append((name, cover_path, speakers, lang, example,
|
src/__pycache__/attentions.cpython-38.pyc
ADDED
Binary file (9.55 kB). View file
|
|
src/__pycache__/commons.cpython-38.pyc
ADDED
Binary file (6.1 kB). View file
|
|
src/__pycache__/models.cpython-38.pyc
ADDED
Binary file (15.3 kB). View file
|
|
src/__pycache__/modules.cpython-38.pyc
ADDED
Binary file (11.5 kB). View file
|
|
src/__pycache__/transforms.cpython-38.pyc
ADDED
Binary file (3.94 kB). View file
|
|
src/__pycache__/utils.cpython-38.pyc
ADDED
Binary file (7.13 kB). View file
|
|
src/monotonic_align/__pycache__/__init__.cpython-38.pyc
CHANGED
Binary files a/src/monotonic_align/__pycache__/__init__.cpython-38.pyc and b/src/monotonic_align/__pycache__/__init__.cpython-38.pyc differ
|
|
src/monotonic_align/__pycache__/core.cpython-38.pyc
CHANGED
Binary files a/src/monotonic_align/__pycache__/core.cpython-38.pyc and b/src/monotonic_align/__pycache__/core.cpython-38.pyc differ
|
|
src/text/__pycache__/__init__.cpython-38.pyc
CHANGED
Binary files a/src/text/__pycache__/__init__.cpython-38.pyc and b/src/text/__pycache__/__init__.cpython-38.pyc differ
|
|
src/text/__pycache__/cleaners.cpython-38.pyc
CHANGED
Binary files a/src/text/__pycache__/cleaners.cpython-38.pyc and b/src/text/__pycache__/cleaners.cpython-38.pyc differ
|
|
src/text/__pycache__/japanese.cpython-38.pyc
CHANGED
Binary files a/src/text/__pycache__/japanese.cpython-38.pyc and b/src/text/__pycache__/japanese.cpython-38.pyc differ
|
|
src/text/cleaners.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import re
|
2 |
|
3 |
def japanese_cleaners(text):
|
4 |
-
from text.japanese import japanese_to_romaji_with_accent
|
5 |
text = japanese_to_romaji_with_accent(text)
|
6 |
if len(text) == 0 or re.match('[A-Za-z]', text[-1]):
|
7 |
text += '.'
|
|
|
1 |
import re
|
2 |
|
3 |
def japanese_cleaners(text):
|
4 |
+
from src.text.japanese import japanese_to_romaji_with_accent
|
5 |
text = japanese_to_romaji_with_accent(text)
|
6 |
if len(text) == 0 or re.match('[A-Za-z]', text[-1]):
|
7 |
text += '.'
|