- changes from RPi side

This commit is contained in:
2023-09-08 11:26:27 +01:00
parent 1802af57c3
commit b8939c9124
3 changed files with 21 additions and 14 deletions

View File

@@ -81,7 +81,7 @@ def load_config_and_licenses(server: str):
except Exception as e:
utils.log_error(f'Failed to fetch new licenses and config. Skipping it.')
def find_binaries(bin_directory: Path, license_server: str = None):
def find_binaries(bin_directory: Path, license_server: str = None) -> bool:
# Update path to pvqa/aqua-wb
global PVQA_CFG_PATH, PVQA_LIC_PATH, AQUA_LIC_PATH, PVQA_PATH, AQUA_PATH, PVQA_CMD, AQUA_CMD, SILER_PATH, SPEECH_DETECTOR_PATH
@@ -109,16 +109,16 @@ def find_binaries(bin_directory: Path, license_server: str = None):
PVQA_CFG_PATH = Path(utils.get_script_path()) / 'pvqa.cfg'
if not PVQA_CFG_PATH.exists():
utils.log_error(f'Failed to find pvqa config. Exiting.')
sys.exit(1)
utils.log_error(f'Failed to find pvqa config.')
return False
if not AQUA_PATH.exists():
utils.log_error(f'Failed to find aqua-wb binary. Exiting.')
sys.exit(1)
utils.log_error(f'Failed to find aqua-wb binary.')
return False
if not SILER_PATH.exists():
utils.log_error(f'Failed to find silence_eraser binary. Exiting.')
sys.exit(1)
utils.log_error(f'Failed to find silence_eraser binary..')
return False
if license_server is not None:
AQUA_LIC_PATH = '"license://' + license_server + '"'
@@ -128,16 +128,17 @@ def find_binaries(bin_directory: Path, license_server: str = None):
if not PVQA_LIC_PATH.exists():
PVQA_LIC_PATH = Path(utils.get_script_path()) / 'pvqa.lic'
if not PVQA_LIC_PATH.exists():
utils.log_error(f'Failed to find pvqa license. Exiting.')
sys.exit(1)
utils.log_error(f'Failed to find pvqa license.')
return False
if not AQUA_LIC_PATH.exists():
AQUA_LIC_PATH = Path(utils.get_script_path()) / 'aqua-wb.lic'
if not AQUA_LIC_PATH.exists():
utils.log_error(f'Failed to find AQuA license. Exiting.')
sys.exit(1)
utils.log_error(f'Failed to find AQuA license.')
return False
utils.log(f' Found all analyzers.')
return True
def speech_detector(test_path: str):