CONTACT_DEV='If this error persists, please contact the developers with the error details.'
ERROR_MAPPER={
CUDA_MEMORY_ERROR:
('The application was unable to allocate enough GPU memory to use this model. '+
'Please close any GPU intensive applications and try again.\n'+
'If the error persists, your GPU might not be supported.'),
CUDA_RUNTIME_ERROR:
(f'Your PC cannot process this audio file with the chunk size selected. Please lower the chunk size and try again.\n\n{CONTACT_DEV}'),
DEMUCS_MODEL_MISSING_ERROR:
('The selected Demucs model is missing. '+
'Please download the model or make sure it is in the correct directory.'),
ENSEMBLE_MISSING_MODEL_ERROR:
('The application was unable to locate a model you selected for this ensemble.\n\n'+
'Please do the following to use all compatible models:\n\n1. Navigate to the \"Updates\" tab in the Help Guide.\n2. Download and install the model expansion pack.\n3. Then try again.\n\n'+
'If the error persists, please verify all models are present.'),
FFMPEG_MISSING_ERROR:
('The input file type is not supported or FFmpeg is missing. Please select a file type supported by FFmpeg and try again. '+
'If FFmpeg is missing or not installed, you will only be able to process \".wav\" files until it is available on this system. '+
f'See the \"More Info\" tab in the Help Guide.\n\n{CONTACT_DEV}'),
FILE_MISSING_ERROR:
(f'Missing file error raised. Please address the error and try again.\n\n{CONTACT_DEV}'),
MDX_MEMORY_ERROR:
('The application was unable to allocate enough GPU memory to use this model.\n\n'+
'Please do the following:\n\n1. Close any GPU intensive applications.\n2. Lower the set chunk size.\n3. Then try again.\n\n'+
'If the error persists, your GPU might not be supported.'),
MDX_MODEL_MISSING:
('The application could not detect this MDX-Net model on your system. '+
'Please make sure all the models are present in the correct directory.\n\n'+
'If the error persists, please reinstall application or contact the developers.'),
MDX_RUNTIME_ERROR:
('The application was unable to allocate enough GPU memory to use this model.\n\n'+
'Please do the following:\n\n1. Close any GPU intensive applications.\n2. Lower the set chunk size.\n3. Then try again.\n\n'+
'If the error persists, your GPU might not be supported.'),
WINDOW_SIZE_ERROR:
('Invalid window size.\n\n'+
'The chosen window size is likely not compatible with this model. Please select a different size and try again.'),
SF_WRITE_ERROR:
('Could not write audio file.\n\n'+
'This could be due to one of the following:\n\n1. Low storage on target device.\n2. The export directory no longer exists.\n3. A system permissions issue.'),
SYSTEM_MEMORY_ERROR:
('The application was unable to allocate enough system memory to use this model.\n\n'+
'Please do the following:\n\n1. Restart this application.\n2. Ensure any CPU intensive applications are closed.\n3. Then try again.\n\n'+
'Please Note: Intel Pentium and Intel Celeron processors do not work well with this application.\n\n'+
'If the error persists, the system may not have enough RAM, or your CPU might not be supported.'),
MISSING_MODEL_ERROR:
('Model Missing: The application was unable to locate the chosen model.\n\n'+
'If the error persists, please verify any selected models are present.'),