Moved package specific definitions from typing_extra into package specific typing_extra modules
Backend
General
Updated code so that it uses Pathlib.Path where possible
includes replacing str with strPath for input and Path for output
Introduced typing for Json serializable dicts
Moved definitions into more appropriate modules
delete_gradio_temp is now stored in backend.common
get_rvc_model_files is now stored inbackend.generate_song_cover
renamed backend.manage_voice_models to backend.manage_models
rename INTERMEDIATE_AUDIO_DIR to INTERMEDIATE_AUDIO_BASE_DIR
change default percentage (to display in progress bars) from 0.0 to 0.5
Do not have functions return success messages (instead just return none)
use naming scheme for functions and variable as well as consistent terminology for docstrings
especially with regards to paths, files and directories.
replaced lambda functions with functions from operator module where possible and otherwise with named inline functions
Manage models
Modelled public models table with pydantic models for more accurate typing and runtime validation
Simplified load_public_models_table function by using list comprehension instead of for-loop
Simplified _extract_model function by
Using a dictionary comprehension to save any model file and index file found in the extracted zip file.
Removing the except block and instead doing all cleanup in the finally block by utilizing a new extraction_completed variable and a new remove_incomplete function parameter.
Added extra URL validation to download_model function.
Simplified upload_model by using pattern matching on the (sorted) sequence of input files
Song cover generation
Added enum for valid source types
Modelled arg dicts for vocal conversion and vocal post-processing with pydantic models for better typing
re-ordered definitions of both private and public functions
private functions are now defined before public functions
both private functions and public functions are defined within their sections according to when they are used in the song cover generation pipeline
./models/rvc/MODELS.txt
./models/rvc/public_models.json
__init__.py
for all user-defined packages.list
withSequence
where possible.typing_extra
into package specifictyping_extra
modulesPathlib.Path
where possiblestr
withstrPath
for input andPath
for outputdelete_gradio_temp
is now stored inbackend.common
get_rvc_model_files
is now stored inbackend.generate_song_cover
backend.manage_voice_models
tobackend.manage_models
INTERMEDIATE_AUDIO_DIR
toINTERMEDIATE_AUDIO_BASE_DIR
0.0
to0.5
operator
module where possible and otherwise with named inline functionsload_public_models_table
function by using list comprehension instead of for-loop_extract_model
function byexcept
block and instead doing all cleanup in thefinally
block by utilizing a newextraction_completed
variable and a newremove_incomplete
function parameter.download_model
function.upload_model
by using pattern matching on the (sorted) sequence of input files