Skip to main content
1-Visitor
August 12, 2019
Solved

Trigger function with voice command on Hololens?

  • August 12, 2019
  • 1 reply
  • 2219 views

How do I trigger a function with the voice command? I have added an external application which recognice my voice, but the function I have added in the box below dont seem to be triggered? What should I do next here?

 

thank you.

Best answer by ClayHelberg

There's a trick to this: to reference your function use "viewCtrl.myFunction()" (where "myFunction" is the name of your function) when triggering it from a voice command in a Hololens project.

 

If it still doesn't work, then try using the debugging tools in the Preview window to see if any errors are being generated when you click the button to simulate saying the target phrase.

1 reply

18-Opal
August 12, 2019

There's a trick to this: to reference your function use "viewCtrl.myFunction()" (where "myFunction" is the name of your function) when triggering it from a voice command in a Hololens project.

 

If it still doesn't work, then try using the debugging tools in the Preview window to see if any errors are being generated when you click the button to simulate saying the target phrase.

15-Moonstone
October 3, 2023

Hello ClayHelberg,

 

I have added "viewCtrl.myFunction()" , where myFunction is my separate 'xyz' function.

When I execute the "Play" command, Creo illustrate animation is playing and one image is getting true\visible and When I execute "Back" command for Rewinding same step, the image is not showing but Animation is playing. However It is working fine in Preview but not on Hololens2.

 

Is there any workaround to it? As its working correctly in preview, ideally it should work on the device as well.

 

Looking forward for some guidance.

18-Opal
October 3, 2023

It's hard to say what might be happening here without seeing your code. But if there is a discrepancy between what you see in preview and what you see on the device, that is probably an issue that you should report to PTC. They may be able to tell you why you are seeing a difference, and how to fix it.