Enable thinking sound automatically on startup using command
This commit is contained in:
1 parent
be7ed5e9fb
commit
9bddfa60a3
1 file changed
+9
@@ -91,6 +91,9 @@ async def main() -> None:
|
||||
parser.add_argument(
|
||||
"--port", type=int, default=6053, help="Port for ESPHome server (default: 6053)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--thinking-sound", action="store_true", help="Enable thinking sound on startup"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--debug", action="store_true", help="Print DEBUG messages to console"
|
||||
)
|
||||
@@ -167,6 +170,9 @@ async def main() -> None:
|
||||
else:
|
||||
preferences = Preferences()
|
||||
|
||||
if args.enable_thinking_sound:
|
||||
preferences.thinking_sound = 1
|
||||
|
||||
# Load wake/stop models
|
||||
active_wake_words: Set[str] = set()
|
||||
wake_models: Dict[str, Union[MicroWakeWord, OpenWakeWord]] = {}
|
||||
@@ -223,6 +229,9 @@ async def main() -> None:
|
||||
refractory_seconds=args.refractory_seconds,
|
||||
)
|
||||
|
||||
if args.enable_thinking_sound:
|
||||
state.save_preferences()
|
||||
|
||||
process_audio_thread = threading.Thread(
|
||||
target=process_audio,
|
||||
args=(state, mic, args.audio_input_block_size),
|
||||
|
||||
Reference in new issue
Block a user