Adding a Welcome Voice Message to HoloLens Project: How to Achieve It?
May 23, 2023
09:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
May 23, 2023
09:14 AM
Adding a Welcome Voice Message to HoloLens Project: How to Achieve It?
Hi team, I would like to add a welcome voice message to one of the HoloLens projects. It should play once I place the model on the surface. How can I achieve this?
Labels:
- Labels:
-
Best Practices
-
Coding
-
Examples
-
Troubleshooting
1 REPLY 1
May 23, 2023
09:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
May 23, 2023
09:37 AM
Hi @RK_9880418 ,
for output of spoken text on HL device you could use some code like this:
$scope.app.speak = function (msg_txt)
{
//return 0; //used speak only for debugging purppose and here is deactivated
var msg = new SpeechSynthesisUtterance(msg_txt);
msg.rate = 2.0;
console.warn(msg)
window.speechSynthesis.speak(msg);
}
then call it e.g. app.speak("This my message");
then in the tracking acquired event
of the spatial target widget. - I believe you use a spatial widget when you mentioned that to set position on surface.
