Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ my_examples = [
|
|
34 |
my_article = "<h3>More Infos</h3>" \
|
35 |
"<table><tr>" \
|
36 |
"<td><image src = 'https://www.web3.lu/wp-content/uploads/2024/07/qubit-bookcovers-200.png' alt = 'bookcovers'></td>" \
|
37 |
-
"<td><p>User guide : 1. Click an example
|
38 |
"<p>2. Enter your own text in the input field, select a voice and the related language of the text, click the submit button, wait for the audio generation and click the play button in the audio field at the right side of the screen.</p>" \
|
39 |
"<p>Technical informations about the development, the training, the model and the dataset are available on my <a href = 'https://github.com/mbarnig/TTS-for-LOD'>Github repository.</a></p>" \
|
40 |
"<p> If you are interested in knowing the whole history of technology projects in relation to the Luxembourgish language, the first volume of my book Qubit Lëtzebuerg is made for you." \
|
@@ -58,9 +58,15 @@ def tts(text: str, speaker_idx: str, language_idx: str):
|
|
58 |
speaker_idx = "Mod"
|
59 |
if language_idx == "Lëtzebuergesch":
|
60 |
language_idx = "D:\\MULTI-LOD\\mailabs\\x-lb"
|
61 |
-
|
62 |
language_idx = "D:\\MULTI-LOD\\mailabs\\x-de"
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
best_model_path = hf_hub_download(repo_id=REPO_ID, filename="checkpoint_180000.pth")
|
65 |
config_path = hf_hub_download(repo_id=REPO_ID, filename="config.json")
|
66 |
speakers_path = hf_hub_download(repo_id=REPO_ID, filename="speakers.pth")
|
|
|
34 |
my_article = "<h3>More Infos</h3>" \
|
35 |
"<table><tr>" \
|
36 |
"<td><image src = 'https://www.web3.lu/wp-content/uploads/2024/07/qubit-bookcovers-200.png' alt = 'bookcovers'></td>" \
|
37 |
+
"<td><p>User guide : 1. Click an example below the input field and click the play button in the audio field at the right side of the screen.</p>" \
|
38 |
"<p>2. Enter your own text in the input field, select a voice and the related language of the text, click the submit button, wait for the audio generation and click the play button in the audio field at the right side of the screen.</p>" \
|
39 |
"<p>Technical informations about the development, the training, the model and the dataset are available on my <a href = 'https://github.com/mbarnig/TTS-for-LOD'>Github repository.</a></p>" \
|
40 |
"<p> If you are interested in knowing the whole history of technology projects in relation to the Luxembourgish language, the first volume of my book Qubit Lëtzebuerg is made for you." \
|
|
|
58 |
speaker_idx = "Mod"
|
59 |
if language_idx == "Lëtzebuergesch":
|
60 |
language_idx = "D:\\MULTI-LOD\\mailabs\\x-lb"
|
61 |
+
elif language_idx == "Deutsch":
|
62 |
language_idx = "D:\\MULTI-LOD\\mailabs\\x-de"
|
63 |
+
elif language_idx == "Français":
|
64 |
+
language_idx = "D:\\MULTI-LOD\\mailabs\\fr-fr"
|
65 |
+
elif language_idx == "English":
|
66 |
+
language_idx = "D:\\MULTI-LOD\\mailabs\\en"
|
67 |
+
else:
|
68 |
+
language_idx = "D:\\MULTI-LOD\\mailabs\\pt-br"
|
69 |
+
|
70 |
best_model_path = hf_hub_download(repo_id=REPO_ID, filename="checkpoint_180000.pth")
|
71 |
config_path = hf_hub_download(repo_id=REPO_ID, filename="config.json")
|
72 |
speakers_path = hf_hub_download(repo_id=REPO_ID, filename="speakers.pth")
|