<?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 Kushang Shah on Medium]]></title>
        <description><![CDATA[Stories by Kushang Shah on Medium]]></description>
        <link>https://medium.com/@keltaedutech99?source=rss-6c2e796c5fe5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*i__ECgyOhcTXlELUl3rCjA.jpeg</url>
            <title>Stories by Kushang Shah on Medium</title>
            <link>https://medium.com/@keltaedutech99?source=rss-6c2e796c5fe5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 12:27:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@keltaedutech99/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[How to add speech recognition in website using Javascript?]]></title>
            <link>https://medium.com/@keltaedutech99/how-to-add-speech-recognition-in-website-using-javascript-cae454df1d43?source=rss-6c2e796c5fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cae454df1d43</guid>
            <category><![CDATA[text-recognition]]></category>
            <category><![CDATA[speech-recognition]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[speech-to-text-api]]></category>
            <category><![CDATA[voice-recognition]]></category>
            <dc:creator><![CDATA[Kushang Shah]]></dc:creator>
            <pubDate>Thu, 30 Dec 2021 09:54:19 GMT</pubDate>
            <atom:updated>2021-12-30T09:54:19.838Z</atom:updated>
            <content:encoded><![CDATA[<p>Speech recognition is a technology to convert speech to text. Like if someone says “Hello” in front of the device then the device will generate a text “Hello”.</p><figure><img alt="speech recognition in websites using javascript" src="https://cdn-images-1.medium.com/max/1024/1*D7_MI1nf0_z6yyRA8jH70g.png" /></figure><p>In order to implement the speech recognition in javascript, Speech Recognition API can be used. This API works best in Google Chrome, Microsoft Edge and Safari. To check the working of the API in your browser simply run the following vanilla javascript code in your browser.</p><pre>if (&#39;speechSynthesis&#39; in window) {<br>    alert(&quot;Speech recognition is supported&quot;);<br>}<br>else {<br>    alert(&quot;Speech recognition not supported in your browser&quot;);<br>}</pre><p>Firefox, Opera, Internet Explorer does not support this API. So, implement this in other web browsers.</p><p>Now, if the API is supported in your browser then let’s implement the speech recognition. First of all, we have to initialize the speech recognition object. To do that simply write the following code…</p><pre>var srec = window.SpeechRecognition || window.webkitSpeechRecognition;  </pre><pre>var recognition = new srec();</pre><p>First, we have initialized the variable srec with API and then created a recognition object in the second statement of the above code.</p><p>Now, we will define 2 callback functions for “onstart” and “onresult” events. So, here are the callback function declaration code.</p><pre>recognition.onstart = function() {   <br>    console.log(&quot;Voice recognition started&quot;);  <br>};</pre><pre>recognition.onresult = function(event) {<br>    // Handle the recognised text    <br>    console.log(&quot;Voice recognition ended&quot;);<br>};</pre><p>Now, whenever the recognition object starts, it will start listening to the speech and then convert it to text and we can handle the generated recognized text in the onresult callback function.</p><p>Here is how we can access the recognised text in the result’s callback method.</p><pre>var transcript = event.results[0][0].transcript;   console.log(&quot;Recognised: &quot;+transcript);</pre><p>To start the recognition simply write following code…</p><pre>recognition.start();</pre><p>So, the final code looks like following…</p><pre>if (&#39;speechSynthesis&#39; in window) {</pre><pre>    var srec = window.SpeechRecognition || window.webkitSpeechRecognition;</pre><pre>    var recognition = new srec();</pre><pre>    recognition.onstart = function() {   <br>        console.log(&quot;Voice recognition started&quot;);  <br>    };</pre><pre>    recognition.onresult = function(event) {<br>        var transcript = event.results[0][0].transcript;<br>        console.log(&quot;Recognised: &quot;+transcript);<br>        console.log(&quot;Voice recognition ended&quot;);<br>    };</pre><pre>    recognition.start();</pre><pre>}<br>else {<br>    alert(&quot;Speech recognition not supported in your browser&quot;);<br>}</pre><p>So, this is how we can add speech recognition in websites using Speech Recognition API.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cae454df1d43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to add Mathematics in the website using Javascript?]]></title>
            <link>https://medium.com/@keltaedutech99/how-to-add-mathematics-in-the-website-using-javascript-28c2b376ff6b?source=rss-6c2e796c5fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/28c2b376ff6b</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[kushang-shah]]></category>
            <category><![CDATA[javascript-library]]></category>
            <category><![CDATA[mathjax]]></category>
            <dc:creator><![CDATA[Kushang Shah]]></dc:creator>
            <pubDate>Wed, 01 Dec 2021 05:14:34 GMT</pubDate>
            <atom:updated>2021-12-01T18:58:41.069Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Beautiful mathematics in web browser using Math JAX" src="https://cdn-images-1.medium.com/max/1024/1*wqvuBh4-BbsLCHDpIFFCfQ.jpeg" /></figure><p>To add beautiful mathematics in a website, a developer can use MathJax library of Javascript. MathJax is a JavaScript display engine for mathematics that works in all browsers. Here is the official site link to <a href="https://www.mathjax.org/">MathJax</a>.</p><p>It is used to display the mathematical notations in web browsers. Like, if someone wants to display square of <em>x</em> in a web browser then they should use the <strong>&lt;sup&gt;&lt;/sup&gt;</strong> tag.</p><figure><img alt="Square of x using MathJAX" src="https://cdn-images-1.medium.com/max/250/1*x449qUD6HfnjJOBR9ltAQQ.png" /></figure><p>But sometimes, the operations are not as simple as this. Like, the integration or differentiation operations. So, for that MathJax comes into the picture. To add MathJax in html, simply add following script tags in the <strong>head</strong> tags.</p><pre>&lt;script type=&quot;text/javascript&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-MML-AM_CHTML&quot;&gt;&lt;/script&gt;</pre><p>Now, you can access the MathJax features. To add a square of <em>x</em> in website simply write following code in the <strong>body</strong> tags of html.</p><pre>\( x^2 \)</pre><p>Now, open this html document in web browser and it will display the following…</p><figure><img alt="square in mathjax" src="https://cdn-images-1.medium.com/max/1024/1*hEPzRBM9jmfNKM20Db31TA.png" /></figure><p>Here, I have taken this screenshot with 500% zoom, so probably the size of x-square in your browser might be different than this one. Now, to make things more clear, let’s create following formula using MathJax.</p><figure><img alt="Formula using mathjax" src="https://cdn-images-1.medium.com/max/1024/1*7ihA9nD_yKxJkU5v9RUEPw.png" /></figure><p>Now, let’s divide the formula in 4 parts. The first one is entire LHS. In the RHS, the second one is -b, then square root part and then the denominator. So, total 4 parts are…</p><ol><li>LHS part</li><li>-b part</li><li>square root part</li><li>denominator part</li></ol><p>In MathJax, if you want to display the formulas then enclose the expressions of it in between <strong>$$…$$</strong>. Now, to display the first part simply write following code.</p><pre>$$ x = $$</pre><p>Then, first we have to deal with the numerator and denominator format. For that, simply write…</p><pre>$$ x = { numerator \over denominator} $$</pre><p>It will display it like…</p><figure><img alt="fraction using mathjax" src="https://cdn-images-1.medium.com/max/1024/1*IFXwOciO7-E4zAXLiT6VWg.png" /></figure><p>Now, we have implemented the numerator and denominator parts. In denominator simply write 2a.</p><pre>$$ x = { numerator \over 2a} $$</pre><p>Now, we are done with the denominator. Then for the numerator, we have 2 parts. The -b part and the square root part. To compute that, we will use 2 commands</p><ol><li>\sqrt = for displaying the square root</li><li>\pm = for displaying the plus or minus</li></ol><p>So, here is the code for the plus or minus operation of 2 parts using \pm.</p><pre>expression1 \pm expression2</pre><p>Now, expression1 is -b. So, simply put -b in place of expression1. It final formula expression, it becomes like…</p><pre>$$x = {-b \pm expression2 \over 2a}.$$</pre><p>Now for expression2, we will use \sqrt command. To display the expression2, simply use this…</p><pre>\sqrt{b^2-4ac}</pre><p>So, now the final expression looks like this.</p><pre>$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$</pre><p>It will display the following formula in the web browser.</p><figure><img alt="plus and minus symbol and square root symbol in mathjax" src="https://cdn-images-1.medium.com/max/1024/1*qmUnwhpa6DZQ105P058rNw.png" /></figure><p>This is a brief introduction to MathJax library of javascript to display beautiful math in websites. If you want to run the MathJax expressions and check the output, then you can use the MathJax editor created by me. Here is the link of the editor: <a href="https://kelta-king.github.io/MathJax-KeltaKing/Editor/editor.html">Kushang Shah’s MathJax Editor</a>. The ui of editor looks like below…</p><figure><img alt="MathJax editor" src="https://cdn-images-1.medium.com/max/1024/1*bm5-v2GtR8vxOXpby_dTvg.png" /></figure><p>Thanks for reading and happy learning :-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28c2b376ff6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>