- better audio duration logging

This commit is contained in:
Dmytro Bogovych 2023-08-14 18:45:39 +03:00
parent 6b28615f1f
commit b07fbfd0d9
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ def run_analyze(file_test: str, file_reference: str, number: str) -> bool:
is_caller : bool = 'caller' in BackendServer.phone.role
is_answerer : bool = 'answer' in BackendServer.phone.role
utils.log(f'Recorded audio call duration: {audio_length}s')
utils.log(f'Recorded audio call duration: {round(audio_length, 3)}s')
# Check if audio length is strange - skip such calls. Usually this is missed call.
if (is_caller and audio_length >= utils_mcon.TIME_LIMIT_CALL) or (is_answerer and audio_length >= utils_mcon.TIME_LIMIT_CALL * 1.2):
utils.log_error(f'Recorded call is too big - looks like mobile operator prompt, skipping analysis')