Spaces:
Running
Running
change bilingual svs to use espnet/mixdata_svs_visinger2_spkemb_lang_pretrained_avg
Browse files- README.md +1 -1
- config/interface/options.yaml +4 -4
- evaluation/svs_eval.py +9 -9
README.md
CHANGED
|
@@ -91,7 +91,7 @@ The system supports multiple preset characters:
|
|
| 91 |
- `meta-llama/Llama-3.2-3B-Instruct`
|
| 92 |
|
| 93 |
#### SVS Models
|
| 94 |
-
- `espnet/
|
| 95 |
- `espnet/aceopencpop_svs_visinger2_40singer_pretrain` (Chinese)
|
| 96 |
|
| 97 |
## Project Structure
|
|
|
|
| 91 |
- `meta-llama/Llama-3.2-3B-Instruct`
|
| 92 |
|
| 93 |
#### SVS Models
|
| 94 |
+
- `espnet/mixdata_svs_visinger2_spkemb_lang_pretrained_avg` (Bilingual)
|
| 95 |
- `espnet/aceopencpop_svs_visinger2_40singer_pretrain` (Chinese)
|
| 96 |
|
| 97 |
## Project Structure
|
config/interface/options.yaml
CHANGED
|
@@ -25,9 +25,9 @@ llm_models:
|
|
| 25 |
name: Qwen3 30B A3B
|
| 26 |
|
| 27 |
svs_models:
|
| 28 |
-
- id: mandarin-espnet/
|
| 29 |
name: Visinger2 (Bilingual)-zh
|
| 30 |
-
model_path: espnet/
|
| 31 |
lang: mandarin
|
| 32 |
voices:
|
| 33 |
voice1: resources/singer/singer_embedding_ace-2.npy
|
|
@@ -35,9 +35,9 @@ svs_models:
|
|
| 35 |
voice3: resources/singer/singer_embedding_itako.npy
|
| 36 |
voice4: resources/singer/singer_embedding_kising_orange.npy
|
| 37 |
voice5: resources/singer/singer_embedding_m4singer_Alto-4.npy
|
| 38 |
-
- id: japanese-espnet/
|
| 39 |
name: Visinger2 (Bilingual)-jp
|
| 40 |
-
model_path: espnet/
|
| 41 |
lang: japanese
|
| 42 |
voices:
|
| 43 |
voice1: resources/singer/singer_embedding_ace-2.npy
|
|
|
|
| 25 |
name: Qwen3 30B A3B
|
| 26 |
|
| 27 |
svs_models:
|
| 28 |
+
- id: mandarin-espnet/mixdata_svs_visinger2_spkemb_lang_pretrained_avg
|
| 29 |
name: Visinger2 (Bilingual)-zh
|
| 30 |
+
model_path: espnet/mixdata_svs_visinger2_spkemb_lang_pretrained_avg
|
| 31 |
lang: mandarin
|
| 32 |
voices:
|
| 33 |
voice1: resources/singer/singer_embedding_ace-2.npy
|
|
|
|
| 35 |
voice3: resources/singer/singer_embedding_itako.npy
|
| 36 |
voice4: resources/singer/singer_embedding_kising_orange.npy
|
| 37 |
voice5: resources/singer/singer_embedding_m4singer_Alto-4.npy
|
| 38 |
+
- id: japanese-espnet/mixdata_svs_visinger2_spkemb_lang_pretrained_avg
|
| 39 |
name: Visinger2 (Bilingual)-jp
|
| 40 |
+
model_path: espnet/mixdata_svs_visinger2_spkemb_lang_pretrained_avg
|
| 41 |
lang: japanese
|
| 42 |
voices:
|
| 43 |
voice1: resources/singer/singer_embedding_ace-2.npy
|
evaluation/svs_eval.py
CHANGED
|
@@ -7,10 +7,11 @@ from pathlib import Path
|
|
| 7 |
|
| 8 |
# ----------- Initialization -----------
|
| 9 |
|
|
|
|
| 10 |
def init_singmos():
|
| 11 |
print("[Init] Loading SingMOS...")
|
| 12 |
return torch.hub.load(
|
| 13 |
-
"South-Twilight/SingMOS:v0.
|
| 14 |
)
|
| 15 |
|
| 16 |
|
|
@@ -25,9 +26,9 @@ def init_per():
|
|
| 25 |
print("[Init] Loading PER...")
|
| 26 |
from transformers import pipeline
|
| 27 |
import jiwer
|
|
|
|
| 28 |
asr_pipeline = pipeline(
|
| 29 |
-
"automatic-speech-recognition",
|
| 30 |
-
model="openai/whisper-large-v3-turbo"
|
| 31 |
)
|
| 32 |
return {
|
| 33 |
"asr_pipeline": asr_pipeline,
|
|
@@ -106,15 +107,14 @@ def pypinyin_g2p_phone_without_prosody(text):
|
|
| 106 |
return phones
|
| 107 |
|
| 108 |
|
| 109 |
-
def eval_per(audio_path, reference_text, evaluator
|
| 110 |
audio_array, sr = librosa.load(audio_path, sr=16000)
|
| 111 |
-
asr_result = evaluator[
|
| 112 |
-
audio_array,
|
| 113 |
-
|
| 114 |
-
)['text']
|
| 115 |
hyp_pinyin = pypinyin_g2p_phone_without_prosody(asr_result)
|
| 116 |
ref_pinyin = pypinyin_g2p_phone_without_prosody(reference_text)
|
| 117 |
-
per = evaluator[
|
| 118 |
return {"per": per}
|
| 119 |
|
| 120 |
|
|
|
|
| 7 |
|
| 8 |
# ----------- Initialization -----------
|
| 9 |
|
| 10 |
+
|
| 11 |
def init_singmos():
|
| 12 |
print("[Init] Loading SingMOS...")
|
| 13 |
return torch.hub.load(
|
| 14 |
+
"South-Twilight/SingMOS:v0.3.0", "singing_ssl_mos", trust_repo=True
|
| 15 |
)
|
| 16 |
|
| 17 |
|
|
|
|
| 26 |
print("[Init] Loading PER...")
|
| 27 |
from transformers import pipeline
|
| 28 |
import jiwer
|
| 29 |
+
|
| 30 |
asr_pipeline = pipeline(
|
| 31 |
+
"automatic-speech-recognition", model="openai/whisper-large-v3-turbo"
|
|
|
|
| 32 |
)
|
| 33 |
return {
|
| 34 |
"asr_pipeline": asr_pipeline,
|
|
|
|
| 107 |
return phones
|
| 108 |
|
| 109 |
|
| 110 |
+
def eval_per(audio_path, reference_text, evaluator):
|
| 111 |
audio_array, sr = librosa.load(audio_path, sr=16000)
|
| 112 |
+
asr_result = evaluator["asr_pipeline"](
|
| 113 |
+
audio_array, generate_kwargs={"language": "mandarin"}
|
| 114 |
+
)["text"]
|
|
|
|
| 115 |
hyp_pinyin = pypinyin_g2p_phone_without_prosody(asr_result)
|
| 116 |
ref_pinyin = pypinyin_g2p_phone_without_prosody(reference_text)
|
| 117 |
+
per = evaluator["jiwer"].wer(" ".join(ref_pinyin), " ".join(hyp_pinyin))
|
| 118 |
return {"per": per}
|
| 119 |
|
| 120 |
|