A few folks have recently sent me requests to add subtitles to the videos in my paid courses. I recently found a transcription service which seems to be doing a decent job (considering I am a non-native English speaker who is talking about some fairly cutting edge technology).
Now I am interested in finding out if there is any real interest in this.
For example, here is a video from my Dialogflow Webhooks course with subtitles added:
And here are the subtitles the company generated for this video (its pretty good):
Speaker: [00:00:00] All right. In this video, I'm going to talk about setting up ngrok. This is very important for being able to debug the PHP code. Now, what ngrok does is it basically sets up like a tunnel from Dialogflow to your local machine so that when you type in a query into the Dialogflow simulator, the request actually is routed to your local box [00:00:30] as if it was the server running the webhook code. Then you can proceed to debug the code from there.
Now, of course, if you return the answer in five seconds, it will not timeout inside the dialogflow simulator, but when this happens, you're obviously in debug mode and you're not particularly concerned whether the response comes back to the dialogflow simulator in five seconds or not.
Now, I'm going to assume that you already have some experience with PHP [00:01:00] because you bought a course, which is talking about dialogflow webhooks using PHP. I'm not going to go into too much of the basic stuff.
I'll also admit that I'm not exactly like an expert in setting up ngrok configuration, which work for me. I also think that it depends from machine to machine. This is just an overview. I am afraid [00:01:30] I can't really help much more than that if this setup does not work for your particular use case. Having said that, with that disclaimer, here is what I did to get it work on my machine.
The first thing is, you have to install MAMP on your computer. This will be saying start servers before it started. Once you click on it, then it will change to green and become stop servers. This means that MAMP [00:02:00] will be running as you try to do this.
This is the changes that I have inside my php.ini file, and this is the xdebug section which is usually at the bottom of the file. These are the settings that I have used for getting it to work for me. Like I said, this is the setup I have. It could change a bit for you. If it does, then you have to go around and search on the [00:02:30] internet and find what works for you.
The next thing is to download and install the ngrok software. Just search for ngrok on Google, and you will be able to get to that site. It's just like a single executable file. Of course, we are going to be using the free version of ngrok.
What you have to do is once you place it inside a folder on your computer, you just have to execute this command I have here, and you can see that the [00:03:00] port I'm using, this is to start ngrok, and the port I'm using is 8888, which actually corresponds to the default port you have on MAMP.
Then once you launch it, actually ngrok will generate a URL which looks like this. You have to copy this portion of the URL, and then you have to paste it into Dialogflow fulfillment. Now, you can see that the actual URL I have, actually it looks a little different. [00:03:30] Here's what the URL looks like for me. This is the URL generated by ngrok first, and then I have a /ngrok/process.php?XDEBUG_SESSION_START=PHPSTORM.
This section which is the query parameter which is at the end is required for you to make sure that the request is going into a debug session of your PHP storm IDE. The other thing is the /ngrok/process.php, [00:04:00] the ngrok there is a folder which is inside the HD docs. You might know that HD docs is the, or you will find out that HD docs is the default folder where you have to place all your stuff when you're using the MAMP software. Now, process.php is just a PHP file I created in that folder.
When I issue a request from the Dialogflow simulator, I actually get some kind of a pop up inside [00:04:30] the PhpStorm IDE, which tells me if I would like to accept an incoming connection from xdebug. It's going to point out which file is going to be debugged. Then once I accept, I will see that it's actually hitting a breakpoint in my code.
Now, before I can do any of these things, one thing which is very, very important is to have this phone, like the listening icon should be turned on. You can see that by the green color you see, [00:05:00] when it's turned off, I think it will be red or something. It will be easy for you to see that it's different.
With all this setup you have-- What happened here is I actually issued a request into my dialogflow simulator, and the URL was pointing to ngrok, which then, in turn, it actually forwarded that request to my IDE, which means now I have a way to set [00:05:30] a breakpoint and actually step through the code. You can see, like I said, the breakpoint is set inside PhpStorm. Now I can just step through the code and proceed to debug the code and all that. Now, with this kind of setup, I don't need to tell you that it makes it much, much easier for you to write your webhook code. If you can get an ngrok working properly and connected to your computer, it makes it much, much easier for you to continue with [00:06:00] running your code.
Now, in the future lessons, I will just assume that you have all this setup and you will be able to step through the code and all that. I'm not going to be actually stepping through the code. For the most part, I'll just actually show you screenshots of the code and show you or rather explain to you what is happening under the hook.
I just wanted to create this little video to explain how to setup, the basic setup if you need [00:06:30] for getting ngrok to work on your computer.
[00:06:36] [END OF AUDIO]
The Searchable Video Subtitles course
I have created a new course called Searchable Video Subtitles.
I plan to price it at $29. The course will contain the subtitles (as .srt or .docx files) for all the videos in all my courses, eventually.
I will be adding the subtitles incrementally, course by course. So the course material will become useful before the end of this year.
If there is no interest
It is quite possible that there is almost no interest in such a service. Since the transcription costs me about $2 per minute of video, I would like to see if there is at least a reasonable interest before I start doing the video transcriptions.
I have a number in mind which I need to hit to make this worthwhile for me to do, so there are two possibilities:
a I hit my target
In that case, I will simply start adding files which contain all the transcripts. You need to download the files to a folder in your computer, but once you search them, you will also be taken to the nearest 30 second point in the video (I will add a code or a key in each video's title for easy cross-referencing)
b I don't hit my target
In that case, I will add a coupon for $29 towards purchase of any of my other courses right inside the course. In other words, if you invest $9 in it today to express interest, you will actually receive 3 times that amount in course credits in case I scrap the project. 🙂
I will update this article, or maybe create another announcement article, by end of November 2018.
At the moment, I expect the course will simply be a list of files in .srt or .docx format (the formats provided by the transcription service). The filename will correspond to the video title inside my course platform.
Once you search for the word and find the corresponding file, you can go to the appropriate video within my course website:
By putting all the files inside a single folder, and doing a folder search, you can search for keywords and open the appropriate video in the course.
Order the course before end of day Nov 22nd 2018 and get a 65% discount
If you order the course before end of day Nov 22nd UTC time, you will get a 65% off discount on the course.