✨ feat(GenerationContext.py): add support for z-index of moviepy clips to improve video rendering
The indentation issue in the process() method has been fixed. The z-index of moviepy clips has been added to improve the rendering of the video. This allows the clips to be rendered in different layers based on their index, resulting in a more visually appealing video.
✨ feat(GenerationContext.py): add support for captioning engine in the GenerationContext class
The import statement for the `moviepy.editor` module is changed to `moviepy.editor as mp` to improve code readability. Additionally, the `gradio` module is imported as `gr` to improve code readability. The `GenerationContext` class now includes a `captioningengine` parameter and initializes a `captioningengine` attribute. The `setup_dir` method is modified to include a call to create a directory for the output files. The `get_file_path` method is modified to return the file path based on the output directory. The `process` method is modified to include additional steps for captioning. The `timed_script` attribute is added to store the result of the `ttsengine.synthesize` method. The `captioningengine` is used to generate captions and store them in the `captions` attribute. The final video is rendered using the `moviepy` library and saved as "final.mp4" in the output directory.
feat(OpenaiLLMEngine.py): add orjson library for JSON serialization and deserialization, and implement the generate method to make API call to OpenAI chat completions endpoint
feat(__init__.py): import OpenaiLLMEngine in LLMEngine package
feat(BaseScriptEngine.py): add time_script method to the BaseScriptEngine class
feat(CustomScriptEngine.py): add new file CustomScriptEngine.py to handle custom script generation, implement generate method to return the provided script, and add get_options method to provide a textbox for the prompt input
feat(__init__.py): import CustomScriptEngine in ScriptEngine package
feat(__init__.py): import LLMEngine package and add OpenaiLLMEngine to the ENGINES dictionary
refactor(gradio_ui.py): change equal_height attribute of Row to False to allow different heights for input blocks