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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Vuforia Studio -> 3D Eyeware -> How do you convert something you say to text?

rrzink91
8-Gravel

Vuforia Studio -> 3D Eyeware -> How do you convert something you say to text?

Okay, let me explain. So my goal is to find a specific book on a bookshelf model by using the following command sequence:

 

Me - Find Book

App - What book are you looking for?

Me - A Tale of Two Cities

 

Once I speak the title of the book, I want whatever JavaScript to convert that phrase to text so I can find the book. Only problem is, I have no Idea how to do that. I'm also using ThingWorx to hold a list of book data for me to port over to display to the user. As far as topics go, I realize how broad this is and I apologize for the ambiguity. Let me know if further clarification is needed.

1 REPLY 1

Hi @rrzink91 , 

so far I know, currently we can  use only commands defined as voice commands/with voice alias. 

 

2020-06-10_19-26-40.jpg

 

for example, here the commands "test" and "foo" will executed some code defined in the Home.js

Possibly you can define some command "atoms" where you can combine them to get a more complex message / to recognize it as spoken text

example:  "book  two   open  start " where in this example the voice commands are  “book”,  “two”, “open” and “start” are different commands. In this case “book”,  “two” and “open” will write setting of some variables to the program stack and then when “start” is called it will start the main procedure which will check the current program stack e.g.  what was called before to execute the desired action.  You can also define some commands to reset the current program stack or  start a new  command sequence

There is an API "Using the Web Speech API"  which I tested and it work fine in a preview mode / inside chrome but unfortunately it does not work on the HoloLens device.

Also another points is that according to  PTC article "Article - CS300379" currently for the voice command only English is supported.

I tested and it seems that the spoken text as output from device is working fine. Some code like this

 

$scope.app.foo= function() {$scope.app.speak("foo was called here");}
//==============
$scope.app.speak = function (msg_txt)
{
  console.log("speak :: "+ msg_txt);
// $scope.app.speech.synthesizeSpeech(textSpeech[i]);}
if(twx.app.isPreview() == true){
  
var msg = new SpeechSynthesisUtterance(msg_txt);
speechSynthesis.speak(msg)

} else { //HoloLens
   
  $scope.app.speech.synthesizeSpeech({'text':msg_txt});   
 }
 
}
///////////////////////////

 

Here the funciton foo could be called from  the voice command define in UI:

 

2020-06-10_19-39-18.jpg

Announcements

Top Tags