Almost talking to the computer!

This is one of those wow projects, so much fun! Simon built his Text-to-Speech and Speech-to-Text demos following Daniel Shiffman’s recent live streams on working with the p5.Speech library and added some extra style features. This basically means that you can type anything on your computer and hear it say what you’ve typed (in any voice or language!) or, in what Simon said was an easier project, yell something to your computer (I love you!) and watch it type it out for you. The next step will be combining the two and including that code into a chat bot code.

You can play with Simon’s Text-to-Speech demo on GitHub at:

Basic text to speech example: https://simon-tiger.github.io/p5_speech/01_text2speech/

Example using different voices: https://simon-tiger.github.io/p5_speech/02_voices/

Basic speech to text example: https://simon-tiger.github.io/p5_speech/03_speech2text/

Code/ repo: https://github.com/simon-tiger/p5_speech

 

 

 

 

 

Advertisements

Simon builds his own RiveScript Editor

Simon has been working on a RiveScript Editor for creating chat bots. RiveScript is a markup language, that gives chat bots the ability to respond to messages from humans using natural human language. This project will involve server side programming, which means that Simon will have to go through the whole process of hosting it on Heroku once he’s finished. So far, he decided to give himself a break in the middle of programming the syntax highlighting, which he found a little too much boring work, so not sure whether the editor will ever be published. In any case, Simon has got quite far and the interface looks good.

Simon has already built three chat bots using RiveScript online editor and Atom.

 

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?

Simon’s Chat Bots

Inspired by Daniel Shiffman’s recent live stream on chat bots, Simon made two chat bots himself. He seems to really enjoy the logic behind programming bot conversations. Daniel Shiffman even tried Simon’s second chat bot out during another streaming session today, which made Simon extremely happy:

Daniel trying Simon's chat bot 9 Oct 2017

And this is how Simon filled his chat bot in himself:

Screen Shot 2017-10-07 at 20.35.05

Here is the link to Simon’s demonstration of a chatbot as a programming language, anyone can play with it online at: https://play.rivescript.com/s/HwDyLgbKwY

 

 

 

 

Simon’s Spellcheck API

Simon has continued with server side programming and made a spellcheck API! Here is the link, you can play with it yourself by adding new words to the corpus (dictionary):

https://spellcheck-api.herokuapp.com/

Here is how the API works:

And the making of, step by step:

 

 

 

 

 

 

 

The project is partially based on what Simon learned from Daniel Shiffman’s tutorials about creating web servers and the materials available online in Daniel Shiffman’s Programming A to Z course (analyzing and generating text-based data) and is partially Simon’s own code.

Where are my compasses?

 

There’s been a lot of drawing going on here lately. And jokes, like in the video above. Yesterday, after he got distracted while trying to draw the exact tangent of a circle, Simon said: “I went off on another tangent. To find a tangent!”

DSC_1902

DSC_1901

DSC_1898

DSC_1890

DSC_1889

 

Text Generating Machine that Posts to Twitter

A milestone in server side programming here, as Simon has built a text generating machine that posts to Simon’s Twitter account! Essentially, it’s website where anyone can enter his own text for the machine to make a “poem” from using an acrostic algorithm; the machine simultaneously posts that “poem” to Simon’s Twitter.

This project falls under the topic of building an interface for Twitter. The original inspiration came from Daniel Shiffman. Simon writes:

You can try my Acrostic machine at http://acrostic-tweeter.herokuapp.com/ and it tweets to my account at https://twitter.com/simontigerh/

In this scenraio, I’m feeding in some text and a word. I’m clicking a button, to tweet the acrostic. I used node to create the server. I later put that server on heroku.

I’m also using a couple of packages:
– express – to host my interface
– socket.io – for the server and the client to talk to eachother
– twit – to tweet the acrostic

 

 

 

 

 

 

In the previous video, I got everything working, except that after I try to use heroku (by typing `heroku login` in git bash), What appeared was:
“`bash: heroku: command not found.
Later we solved this issue by using command prompt:

Simon got positive feedback on his project from Daniel Shiffman, who asked Simon to give some explanation about what the machine on the webpage and also to give a link to Simon’s Twitter:

Acrostic 18 September 2017

Analysis and generation of text-based data. What else to do on vacation?

During the vacation, Simon worked on several programming projects playing with language and grammar, from Daniel Shiffman’s Programming from A to Z course at New York University. Those included creating a new context free grammar sentence generator, using a markov chain in a Google form, creating a diastic machine with JQuery and making a regular expressions tester in JavaScript.