cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Can Cortana speak the work instructions that you have created?

Highlighted
Regular Member

Can Cortana speak the work instructions that you have created?

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

Tags (1)
10 REPLIES 10

Re: Can Cortana speak the work instructions that you have created?

Thanks .. just added it to my demo

Re: Can Cortana speak the work instructions that you have created?

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

Re: Can Cortana speak the work instructions that you have created?

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

Re: Can Cortana speak the work instructions that you have created?

and it looks like the function creates some problem as the line following the call is not processed  ( I also display the Partname and it stay at its first value)

$scope.app.speech.say(PartName[iStep]);   

iStep-iStep+1

Re: Can Cortana speak the work instructions that you have created?

Just got the solution from a developer .. they changed the apps syntax  :

app.speech.synthesizeSpeech({'text': 'hey thingworx'});

Re: Can Cortana speak the work instructions that you have created?

yeah...

published experiences seem still to work - I duplicated one, republished it with a different name... and it doesnt work anymore

....

Thanks for the solution - I will try to adapt my code with it....

Martin

Re: Can Cortana speak the work instructions that you have created?

$scope.app.read = function() {

$scope.view.wdg['3DLabel-1']['visible'] = true;

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.synthesizeSpeech({'text': spokenText});

}

Re: Can Cortana speak the work instructions that you have created?

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?

Re: Can Cortana speak the work instructions that you have created?

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