Monday, 3 July 2017

Andi-4/7/2017

When I walked on the rock road, I found that it was quite dark. So I made some of lights and put them along the street to make it brighter.

Then I wrote the script of transfer the voice into text by follow the tutorial from youtube. However, I found this script could not been used. I checked several times and all of words are followed the vidoe and not mistakes. The  system show it as "Bad syntax ([SyntaxError] Expected `)' in atp:/recordastext2.js:15(76))". I don't understand what does it mean but something wrong.


Script:

(function(){
var textID = "{2393f600-dc82-4f73-8a8c-9d520ea9b637}";

this.enterEntity = function(entityID){
print("Being listening to voice");
LimitlessSpeechRecognition.setAuthKey("TestKey");
LimitlessSpeechRecognition.setListeningToVoice(true);
};

this.leaveEntity = function(entityID){
LimitlessSpeechRecognition.setListeningToVoice(false);
print("Stop Listening to vioce");
};

LimitlessSpeechRecognition.onRecievedTranscription.connect(function(speech{
var newText = {"text" : JSON.stringify(speech)};
Entities.editEntity(textID, newText);
});

LimitlessSpeechRecognition.onFinishedSpeeking.connect(function(speech){
print("Finished speaking");
});
})

No comments:

Post a Comment