Starting work on diffing system.
This commit is contained in:
parent
38eba07644
commit
eaae56627b
@ -45,20 +45,23 @@ def main():
|
|||||||
|
|
||||||
# Important for linux users.
|
# Important for linux users.
|
||||||
# Prevents permanent application hang and crash by using the wrong Microphone
|
# Prevents permanent application hang and crash by using the wrong Microphone
|
||||||
if 'linux' in platform:
|
source = None
|
||||||
mic_name = args.default_microphone
|
# if 'linux' in platform:
|
||||||
if not mic_name or mic_name == 'list':
|
# mic_name = args.default_microphone
|
||||||
print("Available microphone devices are: ")
|
# if not mic_name or mic_name == 'list':
|
||||||
for index, name in enumerate(sr.Microphone.list_microphone_names()):
|
# print("Available microphone devices are: ")
|
||||||
print(f"Microphone with name \"{name}\" found")
|
# for index, name in enumerate(sr.Microphone.list_microphone_names()):
|
||||||
return
|
# print(f"Microphone with name \"{name}\" found")
|
||||||
else:
|
# return
|
||||||
for index, name in enumerate(sr.Microphone.list_microphone_names()):
|
# else:
|
||||||
if mic_name in name:
|
# for index, name in enumerate(sr.Microphone.list_microphone_names()):
|
||||||
source = sr.Microphone(sample_rate=16000, device_index=index)
|
# if mic_name in name:
|
||||||
break
|
# source = sr.Microphone(sample_rate=16000, device_index=index)
|
||||||
else:
|
# break
|
||||||
source = sr.Microphone(sample_rate=16000)
|
# else:
|
||||||
|
# source = sr.Microphone(sample_rate=16000)
|
||||||
|
|
||||||
|
source = sr.Microphone(sample_rate=16000)
|
||||||
|
|
||||||
# Load / Download model
|
# Load / Download model
|
||||||
model = args.model
|
model = args.model
|
||||||
|
Loading…
Reference in New Issue
Block a user