Upload AgentF5TTSChunk.py
I did some modifications from original chunk file
Differences Between the Original and Improved Gradio Interface in AgentF5TTSChunk.py
Improved Error Handling
Original: Did not check if model_path or output_audio_folder existed before processing.
Improved: Now verifies that model_path exists before initializing the model, and that output_audio_folder exists before proceeding. If they don’t exist, it logs an error and prevents execution to avoid crashes.Output Audio Handling
Original: Expected a file path for output audio.
Improved: Now asks for an output folder instead of a specific file, dynamically creating "generated_audio.wav" inside the chosen folder.File Validation Before Returning Output
Original: Directly returned the generated file path.
Improved: Now checks if the generated file exists before returning it to Gradio. If it doesn’t exist, logs an error and returns None.More Robust Logging
Original: Limited logging for errors.
Improved: Added logging for missing files and incorrect paths to help with debugging.Gradio Input Adjustments
Original: Accepted a file path for the model as a string.
Improved: Now uses gr.File for model_path and gr.Textbox for output_audio_folder to ensure the correct types are received.