feat: refine assistant logic and update docs
This commit is contained in:
@@ -130,11 +130,9 @@ class AudioManager:
|
||||
if match_idx is not None:
|
||||
return match_idx
|
||||
|
||||
raise RuntimeError(
|
||||
"Audio input initialization failed: could not find an input device "
|
||||
f"matching AUDIO_INPUT_DEVICE_NAME={AUDIO_INPUT_DEVICE_NAME!r}. "
|
||||
"Available input devices:\n"
|
||||
+ self.describe_input_devices()
|
||||
print(
|
||||
"⚠️ AUDIO_INPUT_DEVICE_NAME was set but no matching input device was found: "
|
||||
f"{AUDIO_INPUT_DEVICE_NAME!r}. Falling back to default input selection."
|
||||
)
|
||||
|
||||
# Default input device (if PortAudio has one).
|
||||
@@ -176,11 +174,9 @@ class AudioManager:
|
||||
)
|
||||
if match_idx is not None:
|
||||
return match_idx
|
||||
raise RuntimeError(
|
||||
"Audio output initialization failed: could not find an output device "
|
||||
f"matching AUDIO_OUTPUT_DEVICE_NAME={AUDIO_OUTPUT_DEVICE_NAME!r}. "
|
||||
"Available output devices:\n"
|
||||
+ self.describe_output_devices()
|
||||
print(
|
||||
"⚠️ AUDIO_OUTPUT_DEVICE_NAME was set but no matching output device was found: "
|
||||
f"{AUDIO_OUTPUT_DEVICE_NAME!r}. Falling back to default output selection."
|
||||
)
|
||||
|
||||
default_idx = self._get_default_output_index()
|
||||
|
||||
Reference in New Issue
Block a user