Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,9 +27,9 @@ prompts = {
|
|
27 |
for key, text in prompts.items():
|
28 |
generate_audio_prompt(text, f"{key}.mp3")
|
29 |
|
30 |
-
# Mapping for correctly converting spoken symbols to text
|
31 |
SYMBOL_MAPPING = {
|
32 |
"at the rate": "@",
|
|
|
33 |
"dot": ".",
|
34 |
"underscore": "_",
|
35 |
"hash": "#",
|
@@ -39,7 +39,7 @@ SYMBOL_MAPPING = {
|
|
39 |
"space": " "
|
40 |
}
|
41 |
|
42 |
-
# Function to clean and
|
43 |
def clean_transcription(text):
|
44 |
text = text.lower()
|
45 |
for word, symbol in SYMBOL_MAPPING.items():
|
|
|
27 |
for key, text in prompts.items():
|
28 |
generate_audio_prompt(text, f"{key}.mp3")
|
29 |
|
|
|
30 |
SYMBOL_MAPPING = {
|
31 |
"at the rate": "@",
|
32 |
+
"at": "@", # Convert "at" to "@"
|
33 |
"dot": ".",
|
34 |
"underscore": "_",
|
35 |
"hash": "#",
|
|
|
39 |
"space": " "
|
40 |
}
|
41 |
|
42 |
+
# Function to clean and replace symbols
|
43 |
def clean_transcription(text):
|
44 |
text = text.lower()
|
45 |
for word, symbol in SYMBOL_MAPPING.items():
|