Skip to Content
Addon DevelopmentRegistering voice commands

Registering voice commands

manifest.json

{ "voice": { "intents": ["crypto.price"] } }

Runtime registration

voice.registerIntent( "crypto.price", { slots: { symbol: { type: "string", required: true }, }, examples: [ "Hey Piper, what's Bitcoin at?", "Hey Piper, Ethereum price please", ], }, async ({ symbol }) => { const price = await fetchPrice(symbol); return { speak: `${symbol} is about ${price} dollars.` }; }, );

ℹ️ Note: Example phrases train the NLU pack shipped with your addon — more diverse phrasing reduces false negatives.

Debugging

  1. Enable verbose voice logs in developer settings.
  2. Print resolved slots before hitting external APIs.
  3. Return { speak: "…", display: … } to also show a card on screen.

Troubleshooting

Intent never fires
Conflicts with core built-ins — rename intent id; check marketplace namespace rules.

Last updated on

Was this helpful?