Simon contributes to the p5.Speech library

Simon has made a pull request to the p5.Speech GitHub repo (a milestone!) and hopes his request gets merged. In this video he explains what he wants to improve with his contribution.

Later it turned out that someone else made a similar request (with more extras) and that request will probably be merged, so Simon was definitely thinking in the right derection. He got positive response from Daniel Shiffman and it looked like Simon’s comments have sparked a discussion on GitHub.

 

Simon contrubuted to p5.Speech library. Pull request 14 Oct 2017

Simon writing on GitHub: 

This github issue is referring to pull request #7.

As you can see in commit a2a5d38, there are some comments. Which look like 
this:

// this one 'start' cycle.  if you need to recognize speech more

// than once, use continuous mode rather than firing start()

// multiple times in a single script.

The comments are right before the start() function in the p5.SpeechRec 
object. But the commit adds arguments to this function:

p5.SpeechRec.prototype.start = function(continuous, interimResults) {

  if('webkitSpeechRecognition' in window) {

    this.rec.continuous = continuous;

    this.rec.interimResults = interimResults;

    this.rec.start();

  }

}

And before, that piece of code looked like this:

p5.SpeechRec.prototype.start = function() {

  if('webkitSpeechRecognition' in window) {

    this.rec.continuous = this.continuous;

    this.rec.interimResults = this.interimResults;

    this.rec.start();

  }

}

Are the comments "unnecessary" now? In other words, Should we remove 
them or leave them there?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s