Skip to main content
5-Regular Member
May 29, 2017
Question

Can Cortana speak the work instructions that you have created?

  • May 29, 2017
  • 2 replies
  • 5015 views

Sure it can. 🙂

On the current implementation of Hololens you can let cortana speak e.g. your work instructions:

You can call a function from your application parameters (e.g. the parameter where you start the sequence with) in this example by:

read();

and in the home.js apply:

$scope.app.read = function() {

$scope.app.speech.say($scope.app.view.wdg['3DLabel-1'].text);

}

of course you can do more advanced things with it ...e.g. if you dont want to say the stepnames (1/8; 2/8; etc) and filter the text that is spoken:

$scope.app.read = function() {

var labelText = $scope.view.wdg['3DLabel-1'].text;

var spokenText = labelText.substr(labelText.indexOf(" ") + 1); // converts "1/8 Whatever text" to "Whatever text"

$scope.app.speech.say(spokenText);

}

Have fun

Martin

2 replies

12-Amethyst
May 31, 2017

Thanks .. just added it to my demo

12-Amethyst
June 10, 2017

It does not seem to work anymore in the latest version of Studio ...

mwassmann5-Regular MemberAuthor
5-Regular Member
June 12, 2017

Can't test it currently as I lent my hololens to a colleague.

@the devs Pam Vermeer​   Is there a full changelog available for us internally so we can check up ourselves why things aren't working / or working differently in new releases?

Thanks

Martin

7-Bedrock
June 27, 2017

This is great! I have it working, just needs some adjustment to get the timing right with my sequence now.

Is there a way using a similar method to do this for handheld devices, Android and iOS?

mwassmann5-Regular MemberAuthor
5-Regular Member
June 28, 2017

Hej Ross,

i just made a short test.

On an Ipad / Ios device it works like this:

$scope.speak = function(){

var msg = new SpeechSynthesisUtterance('Hello World');

window.speechSynthesis.speak(msg);

}

martin

7-Bedrock
June 28, 2017

Great thanks Matrin, I look forward to trying it out.