Spaces:
Runtime error
Runtime error
CjangCjengh
commited on
Commit
·
52eb47a
1
Parent(s):
2a525de
modified interface
Browse files
app.py
CHANGED
@@ -73,10 +73,9 @@ def voice_convert(audio,origin_id,target_id):
|
|
73 |
|
74 |
if __name__=='__main__':
|
75 |
hps_ms = utils.get_hparams_from_file('model/config.json')
|
76 |
-
n_speakers = hps_ms.data.n_speakers
|
77 |
-
n_symbols = len(hps_ms.symbols)
|
78 |
-
speakers = hps_ms.speakers
|
79 |
-
use_f0 = hps_ms.data.use_f0 if 'use_f0' in hps_ms.data.keys() else False
|
80 |
|
81 |
net_g_ms = SynthesizerTrn(
|
82 |
n_symbols,
|
@@ -89,11 +88,7 @@ if __name__=='__main__':
|
|
89 |
|
90 |
with gr.Blocks() as app:
|
91 |
gr.Markdown('# Sanskrit Text to Speech\n'
|
92 |
-
'![visitor badge](https://visitor-badge.glitch.me/badge?page_id=cjangcjengh.sanskrit-tts)
|
93 |
-
'## Based on\n'
|
94 |
-
'- [VITS](https://github.com/jaywalnut310/vits)\n\n'
|
95 |
-
'## Dataset\n'
|
96 |
-
'- [Vāksañcayaḥ](https://www.cse.iitb.ac.in/~asr/)\n\n')
|
97 |
with gr.Tab('Text to Speech'):
|
98 |
text_script=gr.Radio(['Devanagari','IAST','SLP1','HK'],label='Script',interactive=True,value='Devanagari')
|
99 |
text_input = gr.TextArea(label='Text', placeholder='Type your text here',value=DEFAULT_TEXT)
|
@@ -110,5 +105,9 @@ if __name__=='__main__':
|
|
110 |
vc_button = gr.Button('Convert')
|
111 |
audio_output_vc = gr.Audio(label='Voice Converted')
|
112 |
vc_button.click(voice_convert,[audio_input,speaker_input,speaker_output],[audio_output_vc])
|
|
|
|
|
|
|
|
|
113 |
|
114 |
app.launch()
|
|
|
73 |
|
74 |
if __name__=='__main__':
|
75 |
hps_ms = utils.get_hparams_from_file('model/config.json')
|
76 |
+
n_speakers = hps_ms.data.n_speakers
|
77 |
+
n_symbols = len(hps_ms.symbols)
|
78 |
+
speakers = hps_ms.speakers
|
|
|
79 |
|
80 |
net_g_ms = SynthesizerTrn(
|
81 |
n_symbols,
|
|
|
88 |
|
89 |
with gr.Blocks() as app:
|
90 |
gr.Markdown('# Sanskrit Text to Speech\n'
|
91 |
+
'![visitor badge](https://visitor-badge.glitch.me/badge?page_id=cjangcjengh.sanskrit-tts)')
|
|
|
|
|
|
|
|
|
92 |
with gr.Tab('Text to Speech'):
|
93 |
text_script=gr.Radio(['Devanagari','IAST','SLP1','HK'],label='Script',interactive=True,value='Devanagari')
|
94 |
text_input = gr.TextArea(label='Text', placeholder='Type your text here',value=DEFAULT_TEXT)
|
|
|
105 |
vc_button = gr.Button('Convert')
|
106 |
audio_output_vc = gr.Audio(label='Voice Converted')
|
107 |
vc_button.click(voice_convert,[audio_input,speaker_input,speaker_output],[audio_output_vc])
|
108 |
+
gr.Markdown('## Based on\n'
|
109 |
+
'- [VITS](https://github.com/jaywalnut310/vits)\n\n'
|
110 |
+
'## Dataset\n'
|
111 |
+
'- [Vāksañcayaḥ](https://www.cse.iitb.ac.in/~asr/)')
|
112 |
|
113 |
app.launch()
|