Spaces:
Paused
Paused
Update inference/m4singer/base_svs_infer.py
Browse files
inference/m4singer/base_svs_infer.py
CHANGED
@@ -77,7 +77,9 @@ class BaseSVSInfer:
|
|
77 |
@spaces.GPU(duration=8)
|
78 |
def preprocess_word_level_input(self, inp):
|
79 |
# Pypinyin can't solve polyphonic words
|
80 |
-
text_raw = inp['text']
|
|
|
|
|
81 |
|
82 |
# lyric
|
83 |
pinyins = lazy_pinyin(text_raw, strict=False)
|
|
|
77 |
@spaces.GPU(duration=8)
|
78 |
def preprocess_word_level_input(self, inp):
|
79 |
# Pypinyin can't solve polyphonic words
|
80 |
+
text_raw = inp['text'].replace('最长', '最常').replace('长睫毛', '常睫毛') \
|
81 |
+
.replace('那么长', '那么常').replace('多长', '多常') \
|
82 |
+
.replace('很长', '很常') # We hope someone could provide a better g2p module for us by opening pull requests.
|
83 |
|
84 |
# lyric
|
85 |
pinyins = lazy_pinyin(text_raw, strict=False)
|