Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
flatsiedatsie authored Jan 15, 2023
1 parent bd7166b commit fe0613e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/voco_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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')
Expand Down Expand Up @@ -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) )
Expand Down

0 comments on commit fe0613e

Please sign in to comment.