Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
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
Thanks .. just added it to my demo
It does not seem to work anymore in the latest version of Studio ...
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
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
Just got the solution from a developer .. they changed the apps syntax :
app.speech.synthesizeSpeech({'text': 'hey thingworx'});
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.