Update app.py
Browse files
app.py
CHANGED
|
@@ -369,16 +369,7 @@ def audio_func(id: int, lines: List[str], lang: str) -> Tuple[Optional[float], O
|
|
| 369 |
logger.error(f"Audio function failed for ID {id}: {e}", exc_info=True)
|
| 370 |
return None, None
|
| 371 |
|
| 372 |
-
|
| 373 |
-
if __name__ == "__main__":
|
| 374 |
-
# Example: Generate audio for a sample text
|
| 375 |
-
sample_text = "Voltage னு சொல்றது simple circuit ல current அ..."
|
| 376 |
-
sample_lines = [sample_text]
|
| 377 |
-
duration, path = audio_func(0, sample_lines, "Tamil&&&Tamil")
|
| 378 |
-
if path:
|
| 379 |
-
print(f"Generated: {path} (Duration: {duration:.2f}s)")
|
| 380 |
-
else:
|
| 381 |
-
print("Generation failed.")
|
| 382 |
def create_manim_script(problem_data, script_path, audio_path, scale=1):
|
| 383 |
"""Generate Manim script from problem data with robust wrapping."""
|
| 384 |
|
|
|
|
| 369 |
logger.error(f"Audio function failed for ID {id}: {e}", exc_info=True)
|
| 370 |
return None, None
|
| 371 |
|
| 372 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 373 |
def create_manim_script(problem_data, script_path, audio_path, scale=1):
|
| 374 |
"""Generate Manim script from problem data with robust wrapping."""
|
| 375 |
|