use new branch with new accents
Browse files- Dockerfile +1 -1
- app.py +20 -2
Dockerfile
CHANGED
@@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y gnupg && \
|
|
7 |
apt-get update && \
|
8 |
apt-get -y install lame git g++ make autoconf automake libtool pkg-config gcc libsonic-dev ronn kramdown libpcaudio-dev libatlas-base-dev gfortran
|
9 |
|
10 |
-
RUN git clone -b
|
11 |
|
12 |
RUN cd espeak-ng && \
|
13 |
./autogen.sh && \
|
|
|
7 |
apt-get update && \
|
8 |
apt-get -y install lame git g++ make autoconf automake libtool pkg-config gcc libsonic-dev ronn kramdown libpcaudio-dev libatlas-base-dev gfortran
|
9 |
|
10 |
+
RUN git clone -b new_catalan_accents https://github.com/projecte-aina/espeak-ng
|
11 |
|
12 |
RUN cd espeak-ng && \
|
13 |
./autogen.sh && \
|
app.py
CHANGED
@@ -45,11 +45,29 @@ global_phonemizer_balear = phonemizer.backend.EspeakBackend(
|
|
45 |
logger=critical_logger,
|
46 |
)
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
def phonemiser(text, dialect):
|
49 |
phonemizers = {"Central": global_phonemizer_central,
|
50 |
"Valencian": global_phonemizer_valencia,
|
51 |
"North-West": global_phonemizer_occidental,
|
52 |
-
"Balear": global_phonemizer_balear
|
|
|
|
|
53 |
|
54 |
fonemitzador = phonemizers[dialect] #Set correct dialect for the phonemiser
|
55 |
# synthesize
|
@@ -102,7 +120,7 @@ with gr.Blocks(theme=theme) as app:
|
|
102 |
lines=4
|
103 |
)
|
104 |
|
105 |
-
dialect = gr.Dropdown(label="Dialect", choices=["Central", "Valencian", "North-West", "Balear"], value="Central")
|
106 |
with gr.Row(variant="panel"):
|
107 |
clear_btn = gr.Button(
|
108 |
"Clean",
|
|
|
45 |
logger=critical_logger,
|
46 |
)
|
47 |
|
48 |
+
global_phonemizer_algueres = phonemizer.backend.EspeakBackend(
|
49 |
+
language="ca-al",
|
50 |
+
preserve_punctuation=True,
|
51 |
+
with_stress=True,
|
52 |
+
language_switch="remove-flags",
|
53 |
+
logger=critical_logger,
|
54 |
+
)
|
55 |
+
|
56 |
+
global_phonemizer_rossellones = phonemizer.backend.EspeakBackend(
|
57 |
+
language="ca-ro",
|
58 |
+
preserve_punctuation=True,
|
59 |
+
with_stress=True,
|
60 |
+
language_switch="remove-flags",
|
61 |
+
logger=critical_logger,
|
62 |
+
)
|
63 |
+
|
64 |
def phonemiser(text, dialect):
|
65 |
phonemizers = {"Central": global_phonemizer_central,
|
66 |
"Valencian": global_phonemizer_valencia,
|
67 |
"North-West": global_phonemizer_occidental,
|
68 |
+
"Balear": global_phonemizer_balear,
|
69 |
+
"Alguerés": global_phonemizer_algueres,
|
70 |
+
"Rosellonés": global_phonemizer_rossellones}
|
71 |
|
72 |
fonemitzador = phonemizers[dialect] #Set correct dialect for the phonemiser
|
73 |
# synthesize
|
|
|
120 |
lines=4
|
121 |
)
|
122 |
|
123 |
+
dialect = gr.Dropdown(label="Dialect", choices=["Central", "Valencian", "North-West", "Balear", "Alguerés", "Rosellonés"], value="Central")
|
124 |
with gr.Row(variant="panel"):
|
125 |
clear_btn = gr.Button(
|
126 |
"Clean",
|