- +1 fix
This commit is contained in:
parent
9504a2295c
commit
bf60346fc7
|
|
@ -16,6 +16,7 @@ import utils_cache
|
||||||
from bt_controller import Bluetoothctl
|
from bt_controller import Bluetoothctl
|
||||||
import bt_signal
|
import bt_signal
|
||||||
from bt_signal import SignalBoundaries
|
from bt_signal import SignalBoundaries
|
||||||
|
import bt_call_controller
|
||||||
|
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import signal
|
import signal
|
||||||
|
|
@ -268,14 +269,12 @@ def make_call(target: str):
|
||||||
utils.log(f' Done.')
|
utils.log(f' Done.')
|
||||||
|
|
||||||
# Compose a command
|
# Compose a command
|
||||||
utils.close_log_file()
|
# utils.close_log_file()
|
||||||
cmd = f'/usr/bin/python3 {DIR_THIS}/bt_call_controller.py --play-file {reference_filename} --record-file {record_file} --timelimit {reference_length} --target {target}'
|
try:
|
||||||
retcode = os.system(cmd)
|
bt_call_controller.run(play_file=reference_filename, record_file=record_file, timelimit_seconds=reference_length, target=target)
|
||||||
utils.open_log_file(LOG_FILEPATH, 'at')
|
|
||||||
if retcode != 0:
|
|
||||||
utils.log_error(f'BT caller script exited with non-zero code {retcode}, skipping analysis.')
|
|
||||||
else:
|
|
||||||
run_analyze(record_file, REFERENCE_AUDIO, target)
|
run_analyze(record_file, REFERENCE_AUDIO, target)
|
||||||
|
except Exception as e:
|
||||||
|
utils.log_error(f'BT I/O failed finally. Error: {str(e)}')
|
||||||
|
|
||||||
|
|
||||||
def perform_answerer():
|
def perform_answerer():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue