Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ if not IS_DUPLICATE:
|
|
12 |
import misaki
|
13 |
print('DEBUG', kokoro.__version__, CUDA_AVAILABLE, misaki.__version__)
|
14 |
|
15 |
-
CHAR_LIMIT = None if IS_DUPLICATE else
|
16 |
models = {gpu: KModel().to('cuda' if gpu else 'cpu').eval() for gpu in [False] + ([True] if CUDA_AVAILABLE else [])}
|
17 |
pipelines = {lang_code: KPipeline(lang_code=lang_code, model=False) for lang_code in 'ab'}
|
18 |
pipelines['a'].g2p.lexicon.golds['qhash'] = 'kˈOkəɹO'
|
@@ -126,7 +126,7 @@ CHOICES = {
|
|
126 |
for v in CHOICES.values():
|
127 |
pipelines[v[0]].load_voice(v)
|
128 |
|
129 |
-
TOKEN_NOTE = '''
|
130 |
💡 Customize pronunciation with Markdown link syntax and /slashes/ like `[Qhash-TTS]`
|
131 |
|
132 |
💬 To adjust intonation, try punctuation `;:,.!?—…"()“”` or stress `ˈ` and `ˌ`
|
@@ -140,10 +140,10 @@ with gr.Blocks() as generate_tab:
|
|
140 |
out_audio = gr.Audio(label='Output Audio', interactive=False, streaming=False, autoplay=True)
|
141 |
generate_btn = gr.Button('Generate', variant='primary')
|
142 |
with gr.Accordion('Output Tokens', open=True):
|
143 |
-
out_ps = gr.Textbox(interactive=False, show_label=False, info='Tokens used to generate the audio, up to
|
144 |
tokenize_btn = gr.Button('Tokenize', variant='secondary')
|
145 |
gr.Markdown(TOKEN_NOTE)
|
146 |
-
predict_btn = gr.Button('Predict', variant='secondary', visible=False)
|
147 |
|
148 |
STREAM_NOTE = ['⚠️ There is an unknown Gradio bug that might yield no audio the first time you click `Stream`.']
|
149 |
if CHAR_LIMIT is not None:
|
|
|
12 |
import misaki
|
13 |
print('DEBUG', kokoro.__version__, CUDA_AVAILABLE, misaki.__version__)
|
14 |
|
15 |
+
CHAR_LIMIT = None if IS_DUPLICATE else 50000
|
16 |
models = {gpu: KModel().to('cuda' if gpu else 'cpu').eval() for gpu in [False] + ([True] if CUDA_AVAILABLE else [])}
|
17 |
pipelines = {lang_code: KPipeline(lang_code=lang_code, model=False) for lang_code in 'ab'}
|
18 |
pipelines['a'].g2p.lexicon.golds['qhash'] = 'kˈOkəɹO'
|
|
|
126 |
for v in CHOICES.values():
|
127 |
pipelines[v[0]].load_voice(v)
|
128 |
|
129 |
+
"""TOKEN_NOTE = '''
|
130 |
💡 Customize pronunciation with Markdown link syntax and /slashes/ like `[Qhash-TTS]`
|
131 |
|
132 |
💬 To adjust intonation, try punctuation `;:,.!?—…"()“”` or stress `ˈ` and `ˌ`
|
|
|
140 |
out_audio = gr.Audio(label='Output Audio', interactive=False, streaming=False, autoplay=True)
|
141 |
generate_btn = gr.Button('Generate', variant='primary')
|
142 |
with gr.Accordion('Output Tokens', open=True):
|
143 |
+
out_ps = gr.Textbox(interactive=False, show_label=False, info='Tokens used to generate the audio, up to 5010 context length.')
|
144 |
tokenize_btn = gr.Button('Tokenize', variant='secondary')
|
145 |
gr.Markdown(TOKEN_NOTE)
|
146 |
+
predict_btn = gr.Button('Predict', variant='secondary', visible=False)"""
|
147 |
|
148 |
STREAM_NOTE = ['⚠️ There is an unknown Gradio bug that might yield no audio the first time you click `Stream`.']
|
149 |
if CHAR_LIMIT is not None:
|