Open samesoul opened 4 years ago
Need to update https://github.com/mayacakmak/robotapijs to make the speak function return a promise, but the speaking is handled in the backend, so not 100% how to handle this best yet.
I think the issue is that the function is currently non-blocking, so the later function calls happen right away but get dropped b/c the robot is already speaking. We might need a way to catch the ending of speak actions. Ideally we would have two versions of the function; one would block execution until the utterance is done the other would just start an utterance (which is useful for doing two things in parallel), but we need to know when it's done to then start the pause and next utterance. We need to look into the speech process in the back end (face renderer) see if there is an event triggered when the speech is done or a state variable that becomes true/false that we can check/expose to the API.
When inserting consecutive "robot.speak();" functions, only performs first one. Need to add robot.sleep(); functions in between speaking functions and guess the duration, or aggregate them into a single robot.speak(); function (but that removes natural pauses in between sentences).
Either make this explicit in specifications or fix