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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Can Cortana speak the work instructions that you have created?

mwassmann
12-Amethyst

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

10 REPLIES 10
flamy
12-Amethyst
(To:mwassmann)

Thanks .. just added it to my demo

flamy
12-Amethyst
(To:flamy)

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

mwassmann
12-Amethyst
(To:flamy)

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

flamy
12-Amethyst
(To:mwassmann)

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

flamy
12-Amethyst
(To:flamy)

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

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

mwassmann
12-Amethyst
(To:flamy)

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

$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});

}

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?

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

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

Announcements

Top Tags