Spaces:
Runtime error
Runtime error
Daniel981215
commited on
Commit
•
2650c17
1
Parent(s):
1b9a7a0
Update app.py
Browse files
app.py
CHANGED
@@ -21,8 +21,7 @@ embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validat
|
|
21 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
22 |
|
23 |
|
24 |
-
replacements = {'á': 'a', 'é': 'e', 'í': 'i', 'ó': 'o', 'ú': 'u', '¿': '', '?': '', '1': 'uno', '2':'dos','3':'tres', '4':'cuatro', '5':'cinco',
|
25 |
-
'6', 'seis', '7':'siete', '8':'ocho', '9':'nueve', '0':'cero'}
|
26 |
|
27 |
def normalize_replace_string(input_string, replacements):
|
28 |
normalized_string = re.sub(r'\s+', ' ', input_string).strip().lower()
|
|
|
21 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
22 |
|
23 |
|
24 |
+
replacements = {'á': 'a', 'é': 'e', 'í': 'i', 'ó': 'o', 'ú': 'u', '¿': '', '?': '', '1': 'uno', '2':'dos','3':'tres', '4':'cuatro', '5':'cinco', '6': 'seis', '7':'siete', '8':'ocho', '9':'nueve', '0':'cero'}
|
|
|
25 |
|
26 |
def normalize_replace_string(input_string, replacements):
|
27 |
normalized_string = re.sub(r'\s+', ' ', input_string).strip().lower()
|