Allow running a different pipeline depending on wake word
This commit is contained in:
@@ -24,6 +24,7 @@ from .settings import (
|
||||
SndSettings,
|
||||
VadSettings,
|
||||
WakeSettings,
|
||||
WakeWordAndPipeline,
|
||||
)
|
||||
from .utils import (
|
||||
get_mac_address,
|
||||
@@ -114,7 +115,9 @@ async def main() -> None:
|
||||
"--wake-word-name",
|
||||
action="append",
|
||||
default=[],
|
||||
help="Name of wake word to listen for (requires --wake-uri)",
|
||||
nargs="+",
|
||||
metavar=("name", "pipeline"),
|
||||
help="Name of wake word to listen for and optional pipeline name to run (requires --wake-uri)",
|
||||
)
|
||||
parser.add_argument("--wake-command", help="Program to run for wake word detection")
|
||||
parser.add_argument(
|
||||
@@ -329,7 +332,9 @@ async def main() -> None:
|
||||
wake=WakeSettings(
|
||||
uri=args.wake_uri,
|
||||
command=split_command(args.wake_command),
|
||||
names=args.wake_word_name,
|
||||
names=[
|
||||
WakeWordAndPipeline(*wake_name) for wake_name in args.wake_word_name
|
||||
],
|
||||
refractory_seconds=args.wake_refractory_seconds
|
||||
if args.wake_refractory_seconds > 0
|
||||
else None,
|
||||
|
||||
Reference in New Issue
Block a user