Spaces:
Running
Running
Mohamed Aymane Farhi
commited on
Commit
β’
538fed7
1
Parent(s):
fcbf504
Add Tachelhit (shi).
Browse files
app.py
CHANGED
@@ -1,29 +1,25 @@
|
|
1 |
# -*- coding: utf-8 -*-
|
2 |
-
import re
|
3 |
from ttsmms import TTS
|
4 |
import gradio as gr
|
5 |
|
6 |
-
tts = TTS("
|
7 |
-
|
8 |
-
def sanitize(text):
|
9 |
-
return re.sub(r"\u200b", "", text)
|
10 |
|
11 |
def generate_voice(text):
|
12 |
audio = tts.synthesis(text)
|
13 |
return (audio['sampling_rate'], audio['x'])
|
14 |
|
15 |
-
with gr.Blocks(title="
|
16 |
|
17 |
-
gr.Markdown('#
|
18 |
gr.Markdown('MMS: Scaling Speech Technology to 1000+ languages by Meta AI')
|
19 |
|
20 |
-
input_text = gr.Textbox(label="
|
21 |
-
examples = gr.Examples(examples=["αααβααΆβααΌαααβααααααααβαααβαααΈαα‘αΆαα", "αααααααα α¬αααααααα ααΆαααααα’αααΌααααα
αααααααααΆαα·ααααΆααααΆααα½ααααα»αααααα
αα
α»ααααααα"], inputs=[input_text])
|
22 |
|
23 |
-
run_button = gr.Button(value="
|
24 |
|
25 |
out_audio = gr.Audio(
|
26 |
-
label="
|
27 |
type="numpy",
|
28 |
)
|
29 |
|
@@ -38,4 +34,4 @@ with gr.Blocks(title="Khmer Text to Speech with MMS", theme=gr.themes.Default(fo
|
|
38 |
)
|
39 |
|
40 |
|
41 |
-
blocks.queue(concurrency_count=1).launch(debug=True)
|
|
|
1 |
# -*- coding: utf-8 -*-
|
|
|
2 |
from ttsmms import TTS
|
3 |
import gradio as gr
|
4 |
|
5 |
+
tts = TTS("shi")
|
|
|
|
|
|
|
6 |
|
7 |
def generate_voice(text):
|
8 |
audio = tts.synthesis(text)
|
9 |
return (audio['sampling_rate'], audio['x'])
|
10 |
|
11 |
+
with gr.Blocks(title="Tachelhit Text to Speech with MMS") as blocks:
|
12 |
|
13 |
+
gr.Markdown('# Tashelhit Text to Speech - MMS')
|
14 |
gr.Markdown('MMS: Scaling Speech Technology to 1000+ languages by Meta AI')
|
15 |
|
16 |
+
input_text = gr.Textbox(label="Input Text", lines=3)
|
17 |
+
#examples = gr.Examples(examples=["αααβααΆβααΌαααβααααααααβαααβαααΈαα‘αΆαα", "αααααααα α¬αααααααα ααΆαααααα’αααΌααααα
αααααααααΆαα·ααααΆααααΆααα½ααααα»αααααα
αα
α»ααααααα"], inputs=[input_text])
|
18 |
|
19 |
+
run_button = gr.Button(value="Run")
|
20 |
|
21 |
out_audio = gr.Audio(
|
22 |
+
label="Output Audio",
|
23 |
type="numpy",
|
24 |
)
|
25 |
|
|
|
34 |
)
|
35 |
|
36 |
|
37 |
+
blocks.queue(concurrency_count=1).launch(debug=True)
|