Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ class Component:
|
|
34 |
elif self.component_type == "radio":
|
35 |
options_html = ''.join([f'''
|
36 |
<div class="form-check form-check-inline">
|
37 |
-
<input class="form-check-input" type="radio" name="{self.label}" id="{self.label}-{index}" value="{self.value}
|
38 |
<label class="form-check-label" for="{self.label}-{index}">{option}</label></div>''' for index,option in enumerate(self.options)])
|
39 |
return options_html
|
40 |
elif self.component_type == "audio":
|
@@ -188,7 +188,7 @@ def tts(input_data):
|
|
188 |
file.write(text)
|
189 |
|
190 |
# Phonemize the text
|
191 |
-
phonemes_command = [espeak_path, "-v",
|
192 |
phonemes_result = subprocess.run(phonemes_command, capture_output=True, text=True)
|
193 |
phonemized_text = phonemes_result.stdout.strip()
|
194 |
|
|
|
34 |
elif self.component_type == "radio":
|
35 |
options_html = ''.join([f'''
|
36 |
<div class="form-check form-check-inline">
|
37 |
+
<input class="form-check-input" type="radio" name="{self.label}" id="{self.label}-{index}" value="{option}" {'checked' if self.value==option else ''}>
|
38 |
<label class="form-check-label" for="{self.label}-{index}">{option}</label></div>''' for index,option in enumerate(self.options)])
|
39 |
return options_html
|
40 |
elif self.component_type == "audio":
|
|
|
188 |
file.write(text)
|
189 |
|
190 |
# Phonemize the text
|
191 |
+
phonemes_command = [espeak_path, "-v", 'fa', "-x", "-q", "-f", input_file_path]
|
192 |
phonemes_result = subprocess.run(phonemes_command, capture_output=True, text=True)
|
193 |
phonemized_text = phonemes_result.stdout.strip()
|
194 |
|