Spaces:
Runtime error
Runtime error
Commit ·
0d3281e
1
Parent(s): 0666c2b
update
Browse files- app_locally.py +2 -2
app_locally.py
CHANGED
|
@@ -72,7 +72,7 @@ def predict(prompt, audio_file_pth, mic_file_path, use_mic, language):
|
|
| 72 |
|
| 73 |
#tts_model.tts_to_file(prompt, speaker_id, src_path, speaker=style, language=language)
|
| 74 |
speaker_ids = tts_model.hps.data.spk2id
|
| 75 |
-
speaker_id = speaker_ids[
|
| 76 |
|
| 77 |
tts_model.tts_to_file(prompt, speaker_id, src_path)
|
| 78 |
|
|
@@ -157,7 +157,7 @@ with gr.Blocks(analytics_enabled=False) as demo:
|
|
| 157 |
value=False,
|
| 158 |
info="Notice: Microphone input may not work properly under traffic",
|
| 159 |
)
|
| 160 |
-
language = gr.Radio(['
|
| 161 |
|
| 162 |
tts_button = gr.Button("Send", elem_id="send-btn", visible=True)
|
| 163 |
|
|
|
|
| 72 |
|
| 73 |
#tts_model.tts_to_file(prompt, speaker_id, src_path, speaker=style, language=language)
|
| 74 |
speaker_ids = tts_model.hps.data.spk2id
|
| 75 |
+
speaker_id = speaker_ids[language]
|
| 76 |
|
| 77 |
tts_model.tts_to_file(prompt, speaker_id, src_path)
|
| 78 |
|
|
|
|
| 157 |
value=False,
|
| 158 |
info="Notice: Microphone input may not work properly under traffic",
|
| 159 |
)
|
| 160 |
+
language = gr.Radio(['EN_Newest', 'EN-US', 'EN-BR', 'EN_INDIA', 'EN-AU', 'EN-Default', 'ES', 'FR', 'ZH', 'JP', 'KR'], label='Language', value='EN_NEWEST')
|
| 161 |
|
| 162 |
tts_button = gr.Button("Send", elem_id="send-btn", visible=True)
|
| 163 |
|