From fe0613e108e245da9ab36f9331af1fe0d6cf5606 Mon Sep 17 00:00:00 2001 From: flatsiedatsie Date: Sun, 15 Jan 2023 13:06:15 +0100 Subject: [PATCH] Add files via upload --- pkg/voco_adapter.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg/voco_adapter.py b/pkg/voco_adapter.py index 98033eb6..da85e4bb 100644 --- a/pkg/voco_adapter.py +++ b/pkg/voco_adapter.py @@ -1047,7 +1047,7 @@ def set_microphone_gain(self, volume=80): try: if self.DEBUG: - print("in set_microphone_gain. Volume: " + str(volume)) + print("in set_microphone_gain. Volume: " + str(volume) + ", capture_card_id: " + str(capture_card_id)) if int(volume) != self.persistent_data['microphone_gain']: if self.DEBUG: print("will save changed microphone gain level to persistent data") @@ -1056,8 +1056,8 @@ def set_microphone_gain(self, volume=80): if self.missing_microphone == False: if len(self.capture_devices) != 0: - self.capture_card_id = 1 # 0 is internal, 1 is usb. - self.capture_device_id = 0 # Which channel + #self.capture_card_id = 1 # 0 is internal, 1 is usb. + #self.capture_device_id = 0 # Which channel #os.system("sudo amixer cset numid=3 " + volume_percentage + "%") microphone_controls = run_command('amixer -c ' + str(self.capture_card_id) + ' controls') @@ -3106,6 +3106,11 @@ def clock(self, voice_messages_queue): poll_error_count = 0 for process in self.external_processes: try: + + for line in process.stdout: + if self.DEBUG: + print("process stdout: line: " + str(line)) + poll_result = process.poll() #if self.DEBUG: # print("subprocess poll_result: " + str(poll_result) )