Open rzbrk opened 2 years ago
Example:
>>> vr = PyVoiceRecognitionV3(device=dev)
>>> vr.check_system_settings()
{'raw': bytearray(b'\xaa\x08\x00\x00\x00\x01\x00\x00\x00\n'), 'trained': False, 'rec_value_out_of_range': False, 'baudrate': 9600, 'output_io_mode': 'toggle', 'output_io_pulse_width_ms': 10, 'autoload': False, 'group_control': 'disabled'}
>>> vr.check_record_train_status()["no_trained_records"]
6
The above example shows that even in the case the module has 6 trained records the trained status is 0 or "untrained".
The train status also does NOT change when a record is loaded to the recognizer.
Effectively, the train status return by check_system_settings()
is not meaningful. In particular, it seems not to represent the training status of the module.
In addition, it is not clear, in which situation the module could return "record value out of range". The command check system settings
(10) from the module does not accept any argument (i.e. record number).
In essence, this return value from the module should be neglected in the future.
The result for the command
check system settings
(10) of the module contains a statusSTA
(trained status). See: https://github.com/rzbrk/VoiceRecognitionV3#check-system-settings-00. Possible values should be:However, the return value from the module seems always to be 0 (untrained).