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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Adding a Welcome Voice Message to HoloLens Project: How to Achieve It?

RK_9880418
11-Garnet

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?

 

@gvaughn @ThgAngelo @ddfsgsdfg 

1 REPLY 1

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 event2023-05-23_15-34-31.jpg

of the spatial target widget.  - I believe you use a spatial widget  when you mentioned that to set position on surface. 

 

Top Tags