Starting work on diffing system.

This commit is contained in:
Kiri 2025-06-15 07:34:24 -07:00
parent 38eba07644
commit eaae56627b

View File

@ -45,20 +45,23 @@ def main():
# Important for linux users.
# Prevents permanent application hang and crash by using the wrong Microphone
if 'linux' in platform:
mic_name = args.default_microphone
if not mic_name or mic_name == 'list':
print("Available microphone devices are: ")
for index, name in enumerate(sr.Microphone.list_microphone_names()):
print(f"Microphone with name \"{name}\" found")
return
else:
for index, name in enumerate(sr.Microphone.list_microphone_names()):
if mic_name in name:
source = sr.Microphone(sample_rate=16000, device_index=index)
break
else:
source = sr.Microphone(sample_rate=16000)
source = None
# if 'linux' in platform:
# mic_name = args.default_microphone
# if not mic_name or mic_name == 'list':
# print("Available microphone devices are: ")
# for index, name in enumerate(sr.Microphone.list_microphone_names()):
# print(f"Microphone with name \"{name}\" found")
# return
# else:
# for index, name in enumerate(sr.Microphone.list_microphone_names()):
# if mic_name in name:
# source = sr.Microphone(sample_rate=16000, device_index=index)
# break
# else:
# source = sr.Microphone(sample_rate=16000)
source = sr.Microphone(sample_rate=16000)
# Load / Download model
model = args.model