fix(wake): auto capture keeps the backend mic when one exists
With capture:auto the desktop always preferred client streaming, so a local desktop with a working backend mic silently switched from PortAudio to getUserMedia default-device — dropping wake_word.input_device selection (#74363). A ready backend input now wins under auto; client capture is the fallback for a preferring surface on a mic-less backend, and capture:client still forces streaming. Also removes the dead auto branch (both arms returned local) and lets the client-feed test skip cleanly when numpy is absent.
This commit is contained in:
+9
-7
@@ -269,15 +269,17 @@ def resolve_capture_mode(
|
||||
return "client"
|
||||
if raw == "local":
|
||||
return "local"
|
||||
# auto
|
||||
if prefer_client:
|
||||
return "client"
|
||||
# Prefer local when a PortAudio input exists. Without an explicit client
|
||||
# preference (desktop remote), stay on local so CLI/TUI/status still
|
||||
# require a server mic instead of advertising a capture path only the
|
||||
# desktop can feed.
|
||||
# auto: a working backend input always wins so local desktops keep
|
||||
# PortAudio and the configured ``input_device`` selection. Client capture
|
||||
# is the fallback for a preferring surface (desktop remote) on a backend
|
||||
# with no usable mic — the headless VPS/Cloud case.
|
||||
if _local_input_device_ready():
|
||||
return "local"
|
||||
if prefer_client:
|
||||
return "client"
|
||||
# No local mic and no client preference (CLI/TUI): stay local so status
|
||||
# reports the real requirement instead of advertising a capture path
|
||||
# nothing will feed.
|
||||
return "local"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user