<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sreenadh T C on Medium]]></title>
        <description><![CDATA[Stories by Sreenadh T C on Medium]]></description>
        <link>https://medium.com/@imSreenadh?source=rss-e4ae27d8777b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*H6EZvufabwwSqUFtBTm3kQ.jpeg</url>
            <title>Stories by Sreenadh T C on Medium</title>
            <link>https://medium.com/@imSreenadh?source=rss-e4ae27d8777b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 09:01:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@imSreenadh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Eulogy to my best friend from childhood]]></title>
            <link>https://medium.com/@imSreenadh/eulogy-to-my-best-friend-from-childhood-1a74237b4961?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a74237b4961</guid>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Mon, 17 Feb 2020 21:14:25 GMT</pubDate>
            <atom:updated>2020-02-17T21:14:25.877Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>This probably is a very late eulogy. This also means, it took me that long to find the nerve to put together words without breaking down or loosing my composure.</blockquote><p>So here goes the story of two little friends who “are” brothers (from two close families) for a lifetime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hA_4otI4ZgHBYOCGuI0Tg.jpeg" /><figcaption><a href="https://www.pexels.com/photo/two-boys-sitting-on-gray-wood-plank-2738167/">Photo by sudip paul from Pexels</a></figcaption></figure><p>I was almost a year old when he arrived (Hari Krishnan, referred to as <em>Kichus</em> from here on).</p><p>We both grew up sharing toys, getting new dresses together for Onam, buying crackers together for Vishu, fighting for penalties and 6s (and ofcz making amends the very next day).</p><p>I took for granted that this kid is going to be with me forever, see me graduate high school, class 10th, class 12th, see me become an Engineer. But destiny as we call it had other plans.</p><p><em>Kichu was diagnosed with Blood Cancer at the age of 16.</em></p><p>Little did we know that, we started losing each other way before he even turned 16.</p><p>Let me tell you how I remained helpless while everything around me pulled me down into a rabbit hole.</p><p>I was off for school that morning, to attend my last half-yearly exam. Something was off that day from the time I woke up. My mom was acting weird and she was in a hurry to push me off for school. Given this was my exams, I felt this urge was justified. So I walk away from the gate and I could see my mom peeking through the kitchen window, making sure I was not being stopped by anyone to tell me what had happened. I somehow reach the bus-stop, and the bus that comes on time everyday, was no where to be seen.</p><p>I could see my mom outside my house now, with those extended neck looking out for me, checking if I safely got into the bus. At this point I knew something wasn’t right. We all knew Kichu wasn’t gonna make it, coz I saw him a month before this day.</p><p>He had his fare share of <em>chemo </em>done by then, and had lost all his hair. It was hard for me to face him and look him in the eyes that was searching for a bit of hope, coz he knew it all the way.</p><p>How did he know you may ask.</p><p>Coz he had seen his elder sister take the same path to death when he was probably 6.</p><blockquote>Every time I saw him, he was holding on to that smile making sure his mom never saw him suffer the pain he had within. Kichu was strong and he asked me to be strong alongside him and keep my shit together.</blockquote><blockquote><strong>He wanted to do so much thing, and he had very little time.</strong></blockquote><blockquote>We started swimming lessons, we went for painting class, he got himself a gaming PC and we played NFS all day or till he was tired.</blockquote><blockquote>He couldn’t play any more for his heart was weak, but he watched me score goals. Even when he was cheering from the sidelines, I was hoping for that one day when I could celebrate another goal with him.</blockquote><p>So the bus finally arrived and I am off for school. Mom is relieved for the time being.</p><p>I write my exam, thinking about what had happened in the morning. I walk back home in the afternoon, and I open the front door.</p><p>I could see my mom had cried the whole day, and her eyes were so red and dry. I could see my grandma numb and looking at me with those helpless eyes.</p><p>Mom finally said: “ശ്രീ, നമ്മടെ കിച്ചു പോയെടാ / Kichu is no longer with us”</p><p>I don’t remember anything but just one answer. I asked mom if she was hiding this from me in the morning.</p><blockquote>Yes</blockquote><p>I felt so much anger and pain, I wanted to smash the front window glass. I went straight to my room upstairs, shut the door from behind, grabbed a pillow, and bit it like an angry dog and screamed for a long time as far as I can remember.</p><p>I had to be strong.</p><p>How can I be strong, when I hear the friend I thought I had for a lifetime, had gone away for ever.</p><p>How can I be strong when the last image of him I had in my head was of the kid who hoped to live a healthy funny life.</p><p>How can I be strong when I could not even say a final goodbye. I couldn’t even see his body for one last time.</p><p>Days, weeks, and months pass by. I wanted to accept the reality, but till this very day, I wake up on most days empty and have all these thoughts about how we grew up as brothers.</p><p>Chemistry paper was out after valuation, and I still remember the then chemistry teacher asking me in-front of the whole class about what was wrong with me. She wasn’t expecting me to do this poorly in the exam for she knew my mom who also happens to teach the same subject.</p><p>As much as I wanted to shout to the whole class that I just lost my best friend, I kept quite with my head down. I felt so much pain that day, that I tore up the answer paper and threw it away on my way back home. I don’t think any of my classmates knew about the whole Kichu scene.</p><p>I was scared to talk about it and have only told this to a close friend of mine, once. I am still scared and it hurts hell to write this draft, which I don’t know if I would be able to publish.</p><p>Almost 10 years have gone by, and when I look back at my childhood, at least I can still picture the little kid with a bright smile who always had my back.</p><p>This is a Eulogy for you buddy:</p><p><em>You have shown me the courage to fight with hope. You are my brother, I miss you very badly and I’ll always carry you with me. I wish you could see me now. I wasn’t ready for you to go yet, but you left me with no other choice. Growing up into adulthood without you was hard, and am still finding it hard to believe its been 10 years since you left.</em></p><p><em>I feel so proud and honored to have shared the kind of brotherhood and love we had for each other for 16 years, but how I wish I could get more of those.</em></p><p><em>I know you tried hard and I understand why you had to give up. I know you faked a lot of smile towards the end but I know you did it for a reason. If something life has taught me from all that you went through, its that “there are some people who always find reason to make others happy, even when they know that they are dying”. I don’t really believe in after life and stuff. For all the people who know me, should now know why I gave up on the concept of God, for God wasn’t there when I needed. I don’t trust someone who doesn’t show up when you need them to. So God for me died with Kichu.</em></p><p><em>Love you, my brother.</em></p><p><em>-Sree</em></p><p>NB. This post is for remembering my friend and also to help me let some of the longing feeling of pain and heavy heart. This post doesn’t really tell half the pain I still have and I could never write something that does. For people who have been in my shoes or are currently in it, please find that strength by holding on to good memories with the ones you lost.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a74237b4961" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Dockup tracks online status of remote agents using Phoenix Presence]]></title>
            <link>https://medium.com/dockup/how-dockup-tracks-online-status-of-remote-agents-using-phoenix-presence-e59d9675fb5e?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e59d9675fb5e</guid>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[websocket]]></category>
            <category><![CDATA[dockup]]></category>
            <category><![CDATA[phoenix-framework]]></category>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Wed, 21 Aug 2019 18:42:18 GMT</pubDate>
            <atom:updated>2019-08-21T18:42:18.466Z</atom:updated>
            <content:encoded><![CDATA[<p>“Is our agent online? Let’s ask Phoenix Presence!”</p><p><a href="https://getdockup.com/">Dockup</a> is a tool that helps engineering teams spin up on-demand environments. We have a UI that talks to several agents which are installed on remote servers. The UI sends commands to these agents over WebSocket connections using Phoenix channels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HfluhEqw4ubDxg99lM4vWg.png" /></figure><p><strong>What if agent went down?</strong></p><p>The commands to spin up and manage environments are sent over to agents running on remote servers. For this to work, we need to make sure our agents are online and ready to receive the commands. In order to do this, we need to keep track of agents assigned to our users and also show the agent’s online status in the UI.</p><p><strong>Our first implementation</strong></p><p>In the UI, we show if the agent for the organization is online and ready to receive the commands. It is an old school synchronous “ping” to agent behind a Retry module, where we ask for “pong” from agent to relay that back to our UI. This has a problem.</p><p>Consider the agent went down due to some unexpected error in the remote server, or suppose the organization has not yet been configured with a proper agent. If the user now opens the page that shows the agent status, the request would be blocked until the “ping” to the agent times out. Unfortunately this would take some time and would be terrible UX. No user would want to see an empty loading screen, only to find out that their agent is actually down!</p><p><strong>Using Phoenix Presence</strong></p><blockquote><a href="https://hexdocs.pm/phoenix/presence.html">Phoenix Presence</a> is a feature which allows you to register process information on a topic and replicate it transparently across a cluster. It’s a combination of both a server-side and client-side library which makes it simple to implement. A simple use-case would be showing which users are currently online in an application.</blockquote><p>If we can track online statuses of users in chat-rooms, it should be possible to track online statuses of our agents too. That’s exactly what we did and here’s a step-by-step guide on how to do it</p><p>Firstly, we need to add Phoenix Presence under the App supervision tree as explained in the official docs.</p><p>We then configure our agents channel to use Presence to track the agents that connect with Dockup. After this, we can then simply ask Presence if there is a <strong><em>presence</em></strong> of an agent in our app!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/087430dfbbfd3a128d72f979652aee1b/href">https://medium.com/media/087430dfbbfd3a128d72f979652aee1b/href</a></iframe><p>Let’s add the lines that tells the user if their Agent is up. Now we’ll call the function</p><pre>Agent.online?(agent_id)</pre><p>in our template to render the status in the UI.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/322ba32012d87f1ec4215fa8fb08ba35/href">https://medium.com/media/322ba32012d87f1ec4215fa8fb08ba35/href</a></iframe><p><strong>Why this is great</strong></p><p>By the time user actually visits the settings page, <strong><em>Presence</em></strong> would already have the info whether that specific agent has already joined the topic or not. Since this is a very basic key-value lookup, it is going to be super quick. We no longer need to play ping-pong with the agent to know the <strong><em>presence</em></strong>!</p><p>Earlier, this page would, in worst case scenario, take around 30–50 seconds to render, simply because the agent was down.</p><pre>[info] Received GET /settings<br>[info] Sent 200 response in 40255.44ms</pre><p>Using Presence, the response time came down to around 40–50ms, or even lower.</p><pre>[info] Received GET /settings<br>[info] Sent 200 response in 17.86ms<br>[info] Received GET /settings<br>[info] Sent 200 response in 49.65ms<br>[info] Received GET /settings<br>[info] Sent 200 response in 65.62ms<br>[info] Received GET /settings<br>[info] Sent 200 response in 31.12ms<br>[info] Received GET /settings<br>[info] Sent 200 response in 51.73ms</pre><p>The most interesting thing about solving this issue for us was that the PR that went in was tiny (just +40/-1), but the impact it had was significant, something we’ve seen time and again with Elixir!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*loxB3VBmpwheuLoZHkYBiw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e59d9675fb5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dockup/how-dockup-tracks-online-status-of-remote-agents-using-phoenix-presence-e59d9675fb5e">How Dockup tracks online status of remote agents using Phoenix Presence</a> was originally published in <a href="https://medium.com/dockup">Dockup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run E2E tests on on-demand environments]]></title>
            <link>https://medium.com/dockup/how-to-run-e2e-tests-on-on-demand-environments-5ec97a9b6b9e?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ec97a9b6b9e</guid>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[staging]]></category>
            <category><![CDATA[qa]]></category>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Wed, 31 Jul 2019 08:43:12 GMT</pubDate>
            <atom:updated>2019-07-31T08:43:12.901Z</atom:updated>
            <content:encoded><![CDATA[<h3>On-demand environments for running end-to-end tests</h3><p>“<em>Be more confident about your code changes by adding end-to-end tests that run for each deployment you create on Dockup.</em>”</p><p>End-to-end testing is a technique used to verify the correctness of an application’s behavior when it works in integration with all its dependencies.<br>Running end-to-end tests have become exceedingly complicated over time as companies embrace service oriented architecture and monoliths turn into micro-services.</p><p>In this blog post, we’ll see how to use Dockup to automatically spin up on-demand environments to run end-to-end tests for every pull request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4vkCeHLWmilvBadwvhSh7Q.png" /></figure><p>We will be explaining this based on <a href="https://cypress.io/">Cypress.io</a> but you can follow the similar steps for configuring your favorite E2E tool to run alongside Dockup deployments.</p><p>For ease of understanding, let’s use a simple VueJS app that implements a TodoMVC.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fjsfiddle.net%2Fyyx990803%2F4dr2fLb7%2Fembed&amp;src=https%3A%2F%2Fjsfiddle.net%2Fyyx990803%2F4dr2fLb7%2Fembedded%2F&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=jsfiddle" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/776a185ba398092be4306f7cb8032b48/href">https://medium.com/media/776a185ba398092be4306f7cb8032b48/href</a></iframe><p>We will keep this source under a common project folder, say todomvc-app/ and also create another folder, say todomvc-app/e2e/. We will write our tests inside this. Cypress test specs are kept under a sub-directory called &quot;cypress&quot; and we will have a cypress.json file inside our e2e folder. See more on how Cypress tests are written from their <a href="https://docs.cypress.io/guides/getting-started/writing-your-first-test.html">docs</a>.</p><p>Once you have your test specs ready, we need to add a Dockerfile and the whole directory structure would look something like this:</p><pre>todomvc-app/<br>|<br>|---- src/<br>|       |---- index.html<br>|       |---- app.js<br>|<br>|---- e2e/<br>|       |----cypress/<br>|       |       |---- fixtures/<br>|       |       |---- integration/<br>|       |       |       |---- add_todo_spec.js<br>|       |       |       |---- mark_todo_spec.js<br>|       |       |---- plugins/<br>|       |       |---- support/<br>|       |<br>|       |---- cypress.json<br>|       |---- Dockerfile<br>|<br>|---- package.json<br>|---- Dockerfile</pre><p>Since the test cases are to be run for several deployments, we will be keeping the baseUrl config value for cypress as an initial dummy URL, and then we will override it with env variables. This is documented by Cypress <a href="https://docs.cypress.io/guides/guides/environment-variables.html#Overriding-Configuration">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*K2VzpV7CQkDS6dDzMvFEmw.png" /><figcaption>Container for the actual todo-app</figcaption></figure><p>Assuming that you have already added the container for the actual app while creating a Dockup Blueprint for your todomvc-app (as shown in figure above), we will add a new container holding the image source details. If you are new to Dockup Blueprint, head over <a href="https://docs.getdockup.com/documentation/blueprint">here</a> to read more about creating one.</p><blockquote>Take care about the Dokcerfile path here, as this is the one which resides inside our e2e folder.</blockquote><p>We will also have to add CYPRESS_BASE_URL env for Cypress to receive a public endpoint for the deployment. This can be done using the Environment Variables Substitution feature ( Refer <a href="https://docs.getdockup.com/documentation/environment-variables?utm_source=medium"><em>DOCKUP_PORT_ENDPOINT_</em></a><em> </em>) in Dockup.</p><p>The cypress container would exit with the overall number of error the test had.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*WKNeRtvlJFK3tZbidH0Q-w.png" /><figcaption>Container form for e2e</figcaption></figure><p>That is all you need to do to have a working cypress end-to-end test running alongside each of the deployments.</p><blockquote>Since containers inside a Dockup deployment spin up when they are ready and not sequentially, you will need a shell script that waits for the UI endpoint to be live before you start to run tests. The script can simply fail when the endpoint is not live, upon which the Dockup container would restart.</blockquote><pre>#!/bin/sh</pre><pre>set -x<br>set -e</pre><pre>echo &quot;Checking if the endpoint for testing is ready...&quot;</pre><pre>response=$(curl --write-out %{http_code} --silent --output /dev/null &quot;$CYPRESS_BASE_URL&quot;)<br>if [[ $response != 200 ]]; then<br>  # exit the script<br>  exit 1<br>fi</pre><p>Cypress has its own docker image configured to run on several CI tools, which you can use it on Dockup as well, without much changes. All you have to do is, put the cypress/folder in the same level as the Dockerfile as their images look for it in the root directory, and as soon as the containers spin up, cypress run command would run. It is however not recommended to do this on Dockup due to the reason mentioned above. Instead, have the script take care of running the cypress command when the endpoint is up.</p><p>Now you can go ahead and deploy this blueprint and have it run the E2E tests for you. Your containers should spin up and the e2e tests should start running. While you wait for them to complete, you can also take a look at the logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/0*Wfww946i8as27mQ7" /><figcaption>Image builds are ready</figcaption></figure><p>A successful deployment with your e2e tests passed would look something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/0*tzWUUEhnZ2RT59iN" /><figcaption>E2E test has passed, and hence the container has a success check</figcaption></figure><p>Checks also send updates to GitHub if the deployments are triggered by PRs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*EZgvBNw8ap4ImoLX2bhD6A.png" /><figcaption>An example of how Dockup sends updates to GitHub PRs</figcaption></figure><p>In the case of cypress, it would exit out with a non-zero exit code when there are failures, and thus the container would also fail, suggesting there are failed test cases.</p><p>Not using Dockup already? <a href="https://getdockup.com/?utm_source=medium">Click here to start for free.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ec97a9b6b9e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dockup/how-to-run-e2e-tests-on-on-demand-environments-5ec97a9b6b9e">How to run E2E tests on on-demand environments</a> was originally published in <a href="https://medium.com/dockup">Dockup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create on-demand environments for WordPress]]></title>
            <link>https://medium.com/dockup/how-to-create-on-demand-environments-for-wordpress-91ae945b7788?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/91ae945b7788</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[wordpress]]></category>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Wed, 31 Jul 2019 08:41:24 GMT</pubDate>
            <atom:updated>2019-07-31T08:41:24.767Z</atom:updated>
            <content:encoded><![CDATA[<p>“<em>Spin up on-demand staging environment to test out your custom plugins and themes for WordPress</em>”</p><p>Setting up a staging environment and maintaining it for every theme/plugin project for WordPress can be very daunting. Quite often when website developers work on design implementations or content creators try to add articles to their website, they tend to seek approval from team members more often than one can imagine. This can be a tedious amount of work and also time consuming if the team is limited by availability of staging environments.</p><p>Dockup helps you mitigate this problem by providing on-demand staging environments for you WordPress site. Your changes would automatically be made available across your team as and when you update it, while letting you concentrate on the design or the article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IseLADp8m7MJxbLcEzgHvA.png" /></figure><p>In this article, we’ll see how you can use Dockup to automatically spin up on-demand copies of your WordPress site.</p><h3>How can Dockup help?</h3><p><a href="https://getdockup.com/">Dockup</a> can automatically spin up a staging environment every time you open a PR for your WordPress site. This way, you will have an environment ready at your disposal, with all the changes from the PR. All you have to do is, push code, test your changes for the theme, and perhaps show it your team.</p><p>You can also deploy your branches manually on Dockup. This can be super useful when a non-tech team member wants to test how the site looks for any commit or branch. Let’s see how to set this up.</p><h3>Setting up Dockup</h3><p>Assuming you have prior knowledge on how/where themes and plugins fits in WordPress, let me quickly setup a sample plugin for the sake of this documentation. If you don’t have any current project, tag along the next step to have a simple source code which we can deploy on Dockup to test things.</p><p>This plugin for WordPress will append a line to each of the post that we create. This can be used to write some thanks message or a goodbye message to the end of each post.</p><p>Setup the project folder as below:</p><ul><li>We have a root project folder called <em>“ending-line-wp-plugin”</em></li><li>A file with the plugin code, <em>“ending-line-wp-plugin/ending-line/ending-line.php”</em></li><li>Dockerfile for building images for Dockup</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/174/0*lWQQpVEGTxi9A839" /><figcaption>Project structure</figcaption></figure><p>Copy paste the following code in the <strong>ending-line.php</strong> file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/32bcb3805798dfd3dba3a13acda1f7c8/href">https://medium.com/media/32bcb3805798dfd3dba3a13acda1f7c8/href</a></iframe><p>Now let’s dockerise this one. Its pretty straightforward here. All you have to do is copy this one project folder in to a plugins folder inside the “wp-content”.</p><pre>FROM wordpress:php7.3-apache</pre><pre>WORKDIR /var/www/html</pre><pre>COPY ending-line/ wp-content/plugins/ending-line/</pre><p>Note that we are not using any scripts to start a MySQL server before we run the actual WordPress server. Dockup lets us spin up both containers separately and we will connect them using the environment variables.</p><p>Let’s create a <a href="https://docs.getdockup.com/documentation/blueprint">Dockup Blueprint</a> for this project and see how we can stage our plugin project.</p><p>We will need two containers here:</p><ol><li><a href="https://hub.docker.com/_/mariadb">MariaDB</a></li><li>The GitHub source using which we will build image.</li></ol><blockquote>Make sure that you have set the env variables for the database container. Refer the ones below for a start</blockquote><pre>MYSQL_USER=wordpress<br>MYSQL_PASSWORD=password<br>MYSQL_ROOT_PASSWORD=password<br>MYSQL_DATABASE=wordpress</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*wqnqMpCr7s4XOipZ_L1hqw.png" /><figcaption>Container for database</figcaption></figure><blockquote>Note that we are using GitHub as the source here, but you can also use a pre-built docker image of the plugin/theme you are developing.</blockquote><blockquote>Also, double check the env variables that your project might need. For this one, we need three. To know what env variables are supported by WordPress, head over <a href="https://hub.docker.com/_/wordpress/">here</a></blockquote><p>Some important env variables are:</p><pre>WORDPRESS_DB_USER=wordpress<br>WORDPRESS_DB_PASSWORD=password<br>WORDPRESS_DB_NAME=wordpress<br>WORDPRESS_DB_HOST=${DOCKUP_SERVICE_mysql}</pre><p>In case you are wondering what the DOCKUP_SERVICE is, please read more about <a href="https://docs.getdockup.com/documentation/environment-variables">Environment Variable Substitution</a> available in Dockup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*9rJ5CxkaVHW-C6D9jWwaJQ.png" /><figcaption>Container for WordPress server</figcaption></figure><p>Looks good, let’s try deploying this environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*N2EpojeF10OHz0djnhlKDw.png" /><figcaption>Successfully deployed WordPress</figcaption></figure><p>Now, you have a staging environment ready for you to test the plugin you just wrote!</p><blockquote>Don’t forget to activate your plugin from the admin panel of WordPress. If you are following this sample app, remember to add the text to be appended to every post via <strong>Settings &gt; Ending Line Plugin</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bEWw5sFkkBlNQjZUKvaO7A.png" /></figure><p>Want Dockup on-demand environments for your WordPress sites? <a href="https://getdockup.com/">Click here to get started.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91ae945b7788" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dockup/how-to-create-on-demand-environments-for-wordpress-91ae945b7788">How to create on-demand environments for WordPress</a> was originally published in <a href="https://medium.com/dockup">Dockup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create on-demand environments for Jekyll Blogs]]></title>
            <link>https://medium.com/dockup/how-to-create-on-demand-environments-for-jekyll-blogs-692b18ec055e?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/692b18ec055e</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[jekyll]]></category>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Wed, 31 Jul 2019 08:40:19 GMT</pubDate>
            <atom:updated>2019-07-31T08:40:19.676Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to create on-demand environments for Jekyll sites</h3><p>“See how your Jekyll site and articles look like before you publish them.”</p><p>Want to see how your site will turn out before you publish? Just open a PR on your repo and <a href="https://getdockup.com/?utm_source=medium">Dockup</a> will spin up a live site for you!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*im3v2VVqiMl045A2QD1kXA.png" /></figure><p>Assuming that you have a Jekyll blog in place, let’s see how we can dockerise it and create a <a href="https://docs.getdockup.com/documentation/blueprint">Dockup Blueprint</a>. Here’s the Jekyll site we’ll use: <a href="https://github.com/jekyll/minima">Minima</a>.</p><p>We’ll add a couple of files to the root directory:</p><ol><li>Dockerfile to build the docker image of our site.</li><li>nginx.conf to serve the static site using Nginx.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ee0f57b0b6822aee61e7b21202bd11e/href">https://medium.com/media/5ee0f57b0b6822aee61e7b21202bd11e/href</a></iframe><h3>Create Blueprint</h3><p>Now that we have a Dockerfile added to the source, let’s create a Dockup Blueprint.</p><blockquote>Make sure you have configured you GitHub account with Dockup. If you haven’t done it yet, you can head over to <a href="https://getdockup.com/settings">Dockup Settings</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*rsLPTpqjQ41erhgTIshHJw.png" /><figcaption>Container for Jekyll</figcaption></figure><p>And that’s all! Wasn’t that easy?</p><p>Now every time you open a pull request, Dockup will stage that branch and give you a new deployment as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*-BEgW_YcOpxXcUmqnHMscw.png" /><figcaption>Deployed successfully</figcaption></figure><p>You can follow similar steps to create on-demand environments for other static site generators, say for e.g. Hugo.</p><p>Would you like to test it out on your blog? <a href="https://getdockup.com/?utm_source=medium">Click here to get started.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=692b18ec055e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dockup/how-to-create-on-demand-environments-for-jekyll-blogs-692b18ec055e">How to create on-demand environments for Jekyll Blogs</a> was originally published in <a href="https://medium.com/dockup">Dockup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[It’s a wrap!]]></title>
            <link>https://medium.com/@imSreenadh/its-a-wrap-fddf68149289?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fddf68149289</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[malayalam]]></category>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Mon, 22 Aug 2016 07:01:22 GMT</pubDate>
            <atom:updated>2016-08-22T07:01:22.182Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“To be successful, the first thing to do is to fall in love with your work — Sister Mary Lauretta”</blockquote><p>Well, the Google Summer of Code 2016 is reaching its final week as I get ready to submit my work. It has been one of those best three-four months of serious effort and commitment. To be frank, this has to be one of those to which I was fully motivated and have put my 100%.</p><p>Well, at first, the results of training wasn’t that promising and I was actually let down. But then, me and my mentor had a series of discussions on submitting, during which she suggested me to retrain the model excluding the data set or audio files of those speakers which produced the most errors. So after completing the batch test, I noticed that four of the data set was having the worst accuracy, which was shockingly below 20%. This was causing the overall accuracy to dip from a normal one.</p><p>So, I decided to delete those four data set and retrain the model. It was not that of a big deal, so I thought its not gonna be drastic change from the current model. But the result put me into a state of shock for about 2–3 seconds. It said</p><pre>TOTAL Words: 12708 Correct: 12375 Errors: 520<br>TOTAL Percent correct = 97.38% Error = 4.09% Accuracy = 95.91%<br>TOTAL Insertions: 187 Deletions: 36 Substitutions: 297<br>SENTENCE ERROR: 9.1% (365/3993) WORD ERROR RATE: 4.1% (519/12708)</pre><p>Now, this looks juicy and near to perfect. But the thing is, the sentences are tested as they where trained. So, if we change the structure of sentence that we ultimately give to recognize, it will still be having issues putting out the correct hypothesis. Nevertheless, it was far more better than it was when I was using the previous model.</p><p>So I guess I will settle with this for now as the aim of the GSoC project was to start the project and show proof of that this can be done, but will keep training better ones in the near future.</p><h4>Google Summer of Code 2016 — Submission</h4><ol><li>Since the whole project was carried under my personal Github repository, I will link the commits in it here : <a href="https://github.com/sreecodeslayer/ml-am-lm-cmusphinx/commits/master">Commits</a></li><li>Project Repository : <a href="https://github.com/sreecodeslayer/ml-am-lm-cmusphinx/tree/master/Further%20development%20files">ml-am-lm-cmusphinx</a></li><li>On top of that, we (me and the organization) had a series of discussions regarding the project over here: <a href="https://discourse.indicproject.org/t/language-model-and-acoustic-model-speech-recognition-development-for-malayalam-using-cmu-sphinx/33">Discourse IndicProject</a></li></ol><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fg1Iu0AYH-dY%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dg1Iu0AYH-dY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fg1Iu0AYH-dY%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e8990c8b26cb11e147e0d3e4c5642a7/href">https://medium.com/media/9e8990c8b26cb11e147e0d3e4c5642a7/href</a></iframe><p>Well, I have been documenting my way through the project over here at Medium starting from the month of May. The blogs can be read from <a href="http://www.medium.com/@imsreenadh">here</a>.</p><h4>What can be done in near future?</h4><p><em>Well, this model is still in its early stage and is still not the one that can be used error free, let alone be applied on applications</em>.</p><p>The data set is <em>still buggy</em> and <em>have to improved</em> with better cleaner audio data and a more tuned Language Model.</p><p>Speech Recognition development is rather slow and is obviously community based. All these are possible with collaborated work towards achieving a user acceptable level of practical accuracy rather than quoting a statistical, theoretical accuracy.</p><p>All necessary steps and procedure have been documented in the <em>README </em>sections of the repository.</p><pre>puts &quot;thank you everyone!&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fddf68149289" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What now?]]></title>
            <link>https://medium.com/@imSreenadh/what-now-3058a6c49e63?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3058a6c49e63</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[indic-project]]></category>
            <category><![CDATA[malayalam]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Tue, 09 Aug 2016 13:56:11 GMT</pubDate>
            <atom:updated>2016-08-09T13:56:11.573Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“Now that the basic aim was fulfilled, what more can we work on, given there is almost half a month to GSoC Submission!”</blockquote><p>Well, as of now the phoneme transcription was done purely based on the manner the word was written and not completely based on the Speech pattern. What I mean is that there are some exceptions in how we write the word and pronounce it (differently). This was pointed out by Deepa mam. She also asked if I could possibly convert some of the existing Linguistic rules(algorithms) that was made with Malayalam TTS in mind, so that it could be used to re-design the phoneme transcription. This could also turn out to be helpful for future use like using it for a fully intelligent <em>Phoneme Transcriber</em> for Malayalam Language Modeling.</p><p>This is what we are working on right now, and am literally like scratching my head over some loops in Python!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*gV-RSNes1lysqxug-_mHIQ.gif" /><figcaption>juzzzz jokinnn</figcaption></figure><blockquote>The basic idea is to iterate over each line in the ‘<em>ml.dic’</em> file and validate the transcription I made earlier with the set of rules. Correcting them (if found invalid) as it goes over.</blockquote><p>Seems pretty straight forward! Will see how it goes!</p><h4>Update — 4th August</h4><p>Wew!, This is going nuts! OK so I first tried using Lists to classify the different types of phones. It all was good, until I reached a point in algorithm where I have to check if the current phoneme in the transcription is a member of a particular class of phoneme ( now, when I say, class of Phoneme, I just mean, the classification and not the <em>class ). </em>Of course I can search in List for the presence of the element and its quite sufficient enough to say in small comparisons. Our case is different. We are talking about around 7000 words in a file, on top of which each line will have significant amount of if-elif clauses.</p><p>This could slow down things and make the script less efficient ( will eventually see the difference ). So I went back to Python documentation and read about the Set Types ( set and frozenset )</p><blockquote>A <em>set</em> object is an un-ordered collection of distinct <a href="https://docs.python.org/3/glossary.html#term-hashable">hashable</a> objects. Common uses include membership testing, removing duplicates from a sequence, and computing mathematical operations such as intersection, union, difference, and symmetric difference. — said the <a href="https://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset">Python doc</a>.</blockquote><p>This is exactly what I wanted. I mean, I don’t have to do any manipulation to the phoneme classes, so there is no real meaning in using a List. Furthermore, the Set supports the ‘<em>in’ </em>using which the membership can be checked with no additional searching procedure<em>. </em><strong><em>How cool is that!</em></strong></p><p><a href="https://github.com/sreecodeslayer/ml-am-lm-cmusphinx/blob/master/Further%20development%20files/others/scripts/linguist.py"><em>here!</em></a></p><h4>Update — 9th August</h4><p>So, after some test on the script, I generated the dictionary file once again, this time applying some of the TTS rules. Now the SphinxTrain is running with this dictionary file. Hopefully, there should be some change in the accuracy.!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZnpeRRDa9NM_M4fubz_5Jw.png" /><figcaption>left panel with new dictionary, right panel with old dictionary</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EclCUQwezHdOMG8c9keckw.png" /><figcaption>left panel with new dictionary, right panel with old dictionary</figcaption></figure><p>This might as well be the last development phase update if all goes well. Then it is submission time.</p><pre>puts &#39;until then ciao&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3058a6c49e63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‘He’ just recognized what I said!]]></title>
            <link>https://medium.com/@imSreenadh/he-just-recognized-what-i-said-826b2ee32b78?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/826b2ee32b78</guid>
            <category><![CDATA[speech-recognition]]></category>
            <category><![CDATA[malayalam]]></category>
            <category><![CDATA[indic-project]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Sun, 31 Jul 2016 07:46:53 GMT</pubDate>
            <atom:updated>2016-07-31T07:46:53.276Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Yipeeee!!</blockquote><blockquote>Well, the title says it all. The computer just recognized what I said in my Mother Tongue! A major step in the right the direction.</blockquote><p>For this to happen, I had to complete the Acoustic Model training. So then!</p><p><strong><em>What is Acoustic Model!</em></strong></p><p>Well it is a set of statistical representational parameters used to learn the language by representing the relation between audio signal and corresponding linguistic features that make up that speech or audio ( phoneme, and transcription! ).</p><p>To produce these we need to set up a database structure as <a href="http://cmusphinx.sourceforge.net/wiki/tutorialam">documented</a> by the CMU SphinxTrain team. Some of these files were common to the Language Model preparation like the phoneme transcription file. After setting up the database it should look <a href="https://github.com/sreecodeslayer/ml-am-lm-cmusphinx/tree/master/Further%20development%20files/AM">like this</a> irrespective of the language!</p><p>The training is straight forward if you get the database error free which was not my case! Thank you! ( **<em> if you get it error free on the first run, you are probably doing it wrong!</em> ** )</p><p>I had to solve two issues ( <a href="https://github.com/sreecodeslayer/ml-am-lm-cmusphinx/issues/29">1</a> and <a href="https://github.com/sreecodeslayer/ml-am-lm-cmusphinx/issues/31">2</a> ) before I could run the training without any hiccups! It took a day to make the patch works in the files. The documentation didn’t mention that the phone set should contain a maximum of 255 phones due to practical limitation though theoretically it had no problems ( found out myself from the CMU help forums. ). That was the Issue : <em>Reduce phoneset to a max of 255 #31. </em>I successfully reduced to what is found in the current repository version.</p><h4>Update — July 27</h4><p>Acoustic Model is ready for testing!</p><blockquote><em>How??!!</em></blockquote><pre>$ sphinxtrain -t ml setup</pre><p>This command will setup the <em>‘etc’ </em>and <em>‘wav’ </em>folder as mentioned above. Now we need to setup the <em>sphinx_train.cfg </em>config file which is excellently <a href="http://cmusphinx.sourceforge.net/wiki/tutorialam">documented</a> by the team.</p><p>Once that is out of the way, run the training.</p><pre>$ cd ml</pre><p>and,</p><pre>$ sphinxtrain run</pre><p>and,</p><blockquote>wait!!</blockquote><p>..</p><p>…</p><p>….</p><blockquote>still waiting!!</blockquote><p>.</p><p>..</p><p>…</p><blockquote>Finally its done! Took quite a lot of time!</blockquote><p>Not only that, my Zenbook finally started showing heating and fan noise. That sixth gen Intel needed some extra air! ( ** nice! ** ).</p><h4>Update — July 29</h4><p>Well, this means, the GSoC 2016 aim have been achieved which was to develop the Language Model and Acoustic Model. Only thing left is to keep testing it.</p><blockquote>The discussion with Deepa mam helped in bringing out a possibility in improving the accuracy which am working on as a branch in parallel to the testing.</blockquote><p>With that in mind for the coming week, that’s it for this week</p><pre>puts &quot;until then ciao!&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=826b2ee32b78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing the Language Model]]></title>
            <link>https://medium.com/@imSreenadh/developing-the-language-model-64f63dbd932d?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/64f63dbd932d</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[natural-language]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[language-model]]></category>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Sun, 24 Jul 2016 06:13:12 GMT</pubDate>
            <atom:updated>2016-07-24T06:13:12.270Z</atom:updated>
            <content:encoded><![CDATA[<p>Finally, I can start the work towards <em>Milestone — 2, </em>which is completing the development of Language Model for Malayalam. Time to completely switch to Ubuntu from here on. Why?</p><blockquote>Well, all the forums related to CMU Sphinx keep telling that they won’t monitor the reports from Windows anyways, and since all the commands and codes mentioned in the documentation is more inclined to Linux, let’s just stick to it as well. After all, when it comes to Open-Source, why should I develop using Microsoft Windows. (** Giggle **)</blockquote><p><strong><em>What is a Statistical Language Model?</em></strong></p><p>Statistical language models describe more complex language, which in our case is Malayalam. They contain probabilities of the words and word combinations. Those probabilities are estimated from a sample data ( the sentence file ) and automatically have some flexibility.</p><p>This means, every combination from the vocabulary is possible, though probability of such combination might vary.</p><p>Let’s say if you create statistical language model from a <em>list of words </em>, which is what I did for my Major Project work, it will still allow to decode word combinations ( phrases or sentences for that matter. ) though it might not be our intent.</p><p>Overall, statistical language models are recommended for free-form input where user could say anything in a natural language and they require way less engineering effort than grammars, you just list the possible sentences using the words from the vocabulary.</p><p>Let me explain this with a traditional Malayalam example:</p><p>Suppose we have these two sentences “ ഞാനും അവനും ഭക്ഷണം കഴിച്ചു ” and “ ചേട്ടൻ ഭക്ഷണം കഴിച്ചില്ലേ ”.</p><p>If we use the statistical language model of this set of sentences, then it is possible to derive more sentences from the words( vocabulary ).</p><p>ഞാനും (1) , അവനും (1) , ഭക്ഷണം (2) , കഴിച്ചു (1) , ചേട്ടൻ (1) , കഴിച്ചില്ലേ (1)</p><p>That is, we can have sentences like “ ഞാനും കഴിച്ചു ഭക്ഷണം ” or maybe “ഭക്ഷണം കഴിച്ചില്ലേ ”, or “ അവനും കഴിച്ചില്ലേ ” and so on. It’s like the <strong>Transitive Property of Equality </strong>but in a more complex manner. Here it&#39;s related to probability of occurrence of a given word after a word. Now this is calculated using the sample data that we provide as the database.</p><p>Now, you might be wondering what the numbers inside the parenthesis mean. Those are nothing but the number of occurrences of each word in the given complete set of sentences. This is calculated by the set of C libraries provided by a toolkit that I will introduce shortly.</p><h4><em>Update — July 18</em></h4><p>Okay!</p><p>Let’s start building. If you remember from my previous blog post/articles, you can recollect me writing about extracting words and then transcribing those to phonetic representation. Those words are nothing but the vocabulary that I just showed.</p><p>For building a language model of such a large scale vocabulary, you will need to use specialized tools or algorithms. One such set of algorithms are provided as C Libraries by the name “<em>CMU-Cambridge Statistical Language Modeling Toolkit</em>” or in short CMU-CLMTK. You can head over to their official <a href="http://www.speech.cs.cmu.edu/SLM_info.html">page</a> to know more about it. I have already installed it. So we are ready to go.</p><p>So according to the documentation,</p><p>The first step is to find out the number of occurrences. (text2wfreq)</p><pre>cat ml.txt | text2wfreq &gt; ml.wfreq</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OOvPDKPY_KdVvBLxYCM-_A.jpeg" /></figure><p>Next we need the .wfreq to .vocab file without the numbers and stuff. Just the words.</p><pre>cat ml.wfreq | wfreq2vocab -top 20000 &gt; ml.vocab</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZC5F48TYW0OemAMEIEbEAg.jpeg" /></figure><p>Oops, there are some issues with the generated vocab file regarding repetitions and additional words here and there which are not required. This might have happened while I was filtering the sentences file but forgot to update or skipped updating the transcription file. Some delay in further process. It&#39;s already late night! I need to sleep!</p><h4>Update — July 19</h4><p>‘Meld’. Thank you <a href="http://unix.stackexchange.com/questions/176751/compare-two-files-and-print-unmatched-lines">StackExchange</a> ❤</p><p>With this guy, its easy to compare everything and make changes simultaneously. It should be done by today!</p><p>.</p><p>.</p><p>Done!</p><p>Okay, now that the issue have been handled, we are getting somewhere. It should be pretty much straight forward now.</p><p>Next we need find list of every <em>id n-gram</em> which occurred in the text, along with its number of occurrences. i.e. Generate a binary id 3-gram of the training text ( <em>ml.txt</em> ), based on this vocabulary ( <em>ml.vocab</em> ).</p><p>By default, the id n-gram file is written out as binary file, unless the <em>-write_ascii</em> switch is used in the command.</p><p><em>-temp ./ </em>switch can be used if youwant to run the command without root permission and use the current working directory as the temp folder. Or you can just run it as root, without any use, which by default will use /usr/tmp as temp folder.</p><pre>cat ml.txt | text2idngram -vocab ml.vocab -temp ./ &gt; ml.idngram</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nIEDdS-mebbzLcwAqm-Log.jpeg" /></figure><p>Finally, we can generate the Language Model. This can either be an ARPA model or a Binary.</p><pre>idngram2lm -idngram ml.idngram -vocab ml.vocab -binary ml.bin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i8y3R2EIhnp9EfPxkCrG9g.jpeg" /></figure><p>or</p><pre>idngram2lm -idngram ml.idngram -vocab ml.vocab -arpa ml.arpa</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X78xkDuYoW09Z7bv5Nq2Sg.jpeg" /></figure><p>Even though ARPA is available, using the binary format of the language model is recommended for faster operations.</p><p>Here is the basic work-flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*v2s7FBb0e6zKvtEJ52Nc6Q.gif" /><figcaption>as provided by the Toolkit Documentation.</figcaption></figure><p>That’s it. The Language Model is complete. I can now go ahead into next step, that is building and training the Acoustic Model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64f63dbd932d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mentioning the huge contributions]]></title>
            <link>https://medium.com/@imSreenadh/mentioning-the-huge-contributions-12005bcaad06?source=rss-e4ae27d8777b------2</link>
            <guid isPermaLink="false">https://medium.com/p/12005bcaad06</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[speech-recognition]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Sreenadh T C]]></dc:creator>
            <pubDate>Sat, 16 Jul 2016 06:14:08 GMT</pubDate>
            <atom:updated>2016-07-16T06:23:20.409Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“ In open source, we feel strongly that to really do something well, you have to get a lot of people involved. — Linus Torvalds ”</blockquote><p>I have always loved the idea of Open Source and have been fortunate enough to be participating in one of the world’s best platform for a student to develop, grow, and learn. Google Summer of Code 2016 have gone past it’s mid-term evaluation, and so have I. The last couple of weeks have been in a slow pace compared to the weeks in June.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xIBVQo-aukZjgxp0EC3iaw.png" /><figcaption>contribution graph — May-June-July</figcaption></figure><p>This is simply because, I was ahead of my schedule while in the Mid-term evaluation period , also I didn’t want to rush things up and screw it up. But, I thought this is the right time to mention the contributions that have been taking place towards this Open Source Project.</p><p>Gathering recordings or speech data for training would mean that a lot of people have to individually record their part, and then send it to me. Now this might seem simple enough to some of you out there, but believe me, recording 250 lines or sentences in Malayalam with all its care is not going to be that interesting.</p><p>Nonetheless, pull requests have been piling up on my <a href="https://github.com/sreecodeslayer/ml-am-lm-cmusphinx">Repository</a> since the early days of the project. The contribution has been really awesome.</p><blockquote><strong>What more can you ask for when your little brother who have absolutely no idea about what the heck am doing, but decides to record 250 sentences in his voice so that I could be successful in completing the project! (** aww… you little prankster… **)</strong></blockquote><p>And he did all this without making much of a mistake or even complaining about the steps I instructed him to follow. He was so careful that he decided to save after I confirm each and every sentence as he records them. (** giggles **). For those who are interested in knowing what he contributed, take a look at this <a href="https://github.com/sreecodeslayer/ml-am-lm-cmusphinx/commit/6cd8425ade647bf88339a3778dd72b47b38096b6">commit</a> and <a href="https://github.com/sreecodeslayer/ml-am-lm-cmusphinx/commit/f04b17a466482c7bf403f8abe4232f56bef4b6ae">this</a>. Oh and by the way, he is just 11 years old :) .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*zUfbmQqeSDk6wHK4x6_a0Q.png" /></figure><p>To not mention other friends along with this, would be unfair.</p><blockquote>So here is a big shout out to all 18 other guys and gals without whom this would not have reached this far.</blockquote><p>I know this blog post was not much about the project when looking in one aspect but, when you look it in another point of view, this is one of the most important part of my GSoC work.</p><p>With the final evaluation, coming up in 4.5 weeks or so, it is time to start wrapping up my work and put up a final submission in a manner that someone with same enthusiasm or even better can take up this and continue to work on it to better it.</p><p>I guess that’s it for this week’s update. More to follow as I near the completion of this awesome experience.</p><pre>puts &quot;until then ciao!&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12005bcaad06" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>