tag:blogger.com,1999:blog-23306684066585640462024-02-20T17:48:47.280-08:00coding queryAshish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-2330668406658564046.post-60386715388704799222012-04-26T00:24:00.001-07:002012-05-03T01:37:13.089-07:00Hindi Speech synthesizer in java<div dir="ltr" style="text-align: left;" trbidi="on">
This tutorial will explain you how to speak Hindi Words using Dhvani Java API.<br />
<br />
<div style="text-align: center;">
Requirements :</div>
<ul>
<li><a href="http://www.ubuntu.com/download/desktop">Linux Operating system</a></li>
<li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6 ( J2SE )</a></li>
<li><a href="http://sourceforge.net/projects/dhvani/files/dhvani-094/Dhvani%200.94/">Dhvani</a> </li>
<li><a href="http://www.sendspace.com/file/ayi6t1">Hindi Speech Synthesizer Source Files</a></li>
</ul>
If you don't have above software please download it by clicking respective software name.<br />
<br />
Implementing Hindi Speech Recognizer:<br />
<ul>
<li>Basic requirement of this Hindi Speech synthesizer is you need to have Linux as your operating system. Because API we are using for synthesize purpose is Dhvani which works only on Linux.</li>
<li>Install JDK 6.</li>
<li>Install Dhvani.Follow the instructions given on <a href="http://dhvani.sourceforge.net/doc/installation.html">Dhvani official website</a>.</li>
<li>You can check if dhvani is properly installed or not by using command</li>
</ul>
<span style="background-color: #f4f4f4; text-align: -webkit-auto;"></span><br />
<div style="text-align: center;">
<div style="text-align: center;">
<span style="color: lime;">Dhvani -v</span></div>
</div>
<span style="background-color: #f4f4f4; text-align: -webkit-auto;">
</span><br />
<div style="text-align: center;">
<ul><span style="background-color: #f4f4f4; text-align: -webkit-auto;">
<li style="text-align: left;">Extract " Hindi Speech Synthesizer.zip" file to "Hindi Speech Synthesizer" folder.</li>
<li style="text-align: left;">Open command prompt and navigate to the the "Hindi Speech Synthesizer" folder.</li>
<li style="text-align: left;">Compile "TestExec.java" file using command</li>
</span></ul>
<div style="text-align: -webkit-auto;">
<span style="color: lime; text-align: center;"> javac TestExec.java</span></div>
</div>
<span style="background-color: #f4f4f4; text-align: -webkit-auto;">
</span><br />
<div style="text-align: center;">
<ul><span style="background-color: #f4f4f4; text-align: -webkit-auto;">
<li style="text-align: left;">Run "TestExec.class" file using command
</li>
</span></ul>
<div style="text-align: center;">
<span style="color: lime;">java TestExec</span></div>
</div>
<span style="background-color: #f4f4f4; text-align: -webkit-auto;">
</span><br />
<div style="text-align: center;">
<ul><span style="background-color: #f4f4f4; text-align: -webkit-auto;">
<li style="text-align: left;">You can hear a voice saying "Mera naam ashish hai".</li>
<li style="text-align: left;">To speak the sentence you want to speak you need to make changes in "Hindi.txt" file.You can write any sentence you want.</li>
<li style="text-align: left;"><b>The most important thing in this system is you need to save "Hindi.txt" file in UTF-8 Format only</b>.</li>
</span></ul>
</div>
<span style="background-color: #f4f4f4; text-align: -webkit-auto;">
</span></div>Ashish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com3tag:blogger.com,1999:blog-2330668406658564046.post-16973589861565599282011-09-21T19:30:00.000-07:002011-09-21T19:33:49.764-07:00Sphinx Video Tutorial<b><span class="Apple-style-span" >Running the demonstration programs</span><span class="Apple-style-span" style="font-family: 'Times New Roman'; background-color: rgb(255, 255, 255); font-size: medium; "><a href="http://cmusphinx.sourceforge.net/sphinx4/#demos"></a></span></b><div><br /></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; background-color: rgb(255, 255, 255); font-size: medium; "><h3>Simple demos to start with sphinx4</h3><ul><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/helloworld/README.html">Hello World Demo</a>: a command line application that recognizes simple phrases.</li><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/hellongram/README.html">Hello N-Gram Demo</a>: a command line application using an N-gram language model for speech recognition</li></ul><h3>Demos for audio file transcription</h3><ul><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/transcriber/README.html">Transcriber Demo</a>: a simple demo program showing how to transcribe a continuous audio file that has multiple utterances separated by silences.</li><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/confidence/README.html">Confidence Demo</a>: a simple demo program showing how to obtain confidence scores for result.</li><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/lattice/README.html">Lattice Demo</a>: a simple demo program showing how to extract lattices from recognition results.</li><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/classbased/README.html">Class-Based Language model Demo</a>: a simple demo of the class based language model.</li><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/aligner/README.html">Aligner Demo</a>: aligns audio file to transcription and get times of words. Can be useful for closed captioning.</li></ul><h3>Dialog demos to write advanced dialog system</h3><ul><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/zipcity/README.html">ZipCity Demo</a>: a Java Web Start technology application that recognizes spoken zip codes and locates the associated city and state.</li><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/jsapi/jsgf/README.html">JSGF Demo</a>: a simple demo program showing how a program can swap between multiple JSGF grammars.</li><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/jsapi/dialog/README.html">Dialog Demo</a>: a demo program showing how a program can swap between multiple JSGF and dictation grammars.</li><li><a href="http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/jsapi/tags/README.html">Action Tags Demo</a>: a demo program showing how to use action tags for post-processing of RuleParse objects obtained from JSGF grammars.</li></ul></span></div>Ashish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com3tag:blogger.com,1999:blog-2330668406658564046.post-7272980470176431982011-06-11T21:31:00.000-07:002011-06-26T19:57:40.655-07:00Expanding Dictionary Of Acoustic Model<span class="Apple-style-span"><p style="line-height: 20px; font-family: Verdana; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span">Hello Everyone,</span></p><p style="line-height: 20px; font-family: Verdana; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span">Today I’m going to tell you how to expand dictionary of acoustic model for Sphinx4. In simple words, This tutorial will tell you how you can add more words in Sphinx’s words database (Dictionary) and let it recognize those words, which are not available in default acoustic models provided by CMU Sphinx. This tutorial is based on “HelloWorld” example provided by CMU Sphinx.</span></p><p style="line-height: 20px; font-family: Verdana; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span"><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Important Files in this example :</strong><br />1 ) HelloWorld.java<br />2) hello.gram<br />3) helloworld.config.xml</span></p><p style="line-height: 20px; font-family: Verdana; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span"><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Acoustic Model used in this example : </strong><br />WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar</span></p><p style="line-height: 20px; font-family: Verdana; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span">Lets say, We are creating a SR system for ABC National airlines. Everything will go fine and Sphinx will recognize most of the words except the name of cities and states of India. Now, I will tell you, How to add name of cities and states in dictionary.</span></p><p style="line-height: 20px; font-family: Verdana; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span"><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; ">PART ONE</span><br />Step 1 :</strong> Create a txt file “words.txt”, Write all the names of cities and states in it and save.<br /><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Step 2</strong> : Open this link : http://www.speech.cs.cmu.edu/tools/lmtool.html<br /><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Step 3</strong> : On that page, go to “Sentence corpus file:” section, Browse to “words.txt” file and click “Compile Knowledge Base”.<br /><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Step 4</strong> : On next page, Click on “Dictionary” link and save that .DIC file.</span></p><p style="line-height: 20px; font-family: Verdana; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span"><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; "><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">PART TWO</strong></span><br /><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Step 1</strong> : Extract WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar file.<br /><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Step 2</strong> : Go to edu\cmu\sphinx\model\acoustic\WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz\dict folder.<br /><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Step 3</strong> : Open “cmudict.0.6d” file in that folder.<br /><strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Step 4</strong> : Copy data from .DIC file, you have downloaded in PART ONE, paste it in “cmudict.0.6d” file and save.</span></p><p style="line-height: 20px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Verdana; "></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; "><span style="font-family: Verdana, sans-serif; "><b>Step 5</b> : Go to command prompt & travel to sphinx4-1.0beta5\lib folder<br />run following command<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; "><span style="font-family: Verdana, sans-serif; ">jar -cf WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; "><span style="font-family: Verdana, sans-serif; "><span class="Apple-style-span"><b>Step 6</b> : Refresh Project in eclipse & run project</span><span class="Apple-style-span" style="font-size: 10pt; "><o:p></o:p></span></span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; "><span class="Apple-style-span">Reference : For this valuable tutorial i would like to thanks Mr. Puneet Kalra for his </span><span class="Apple-style-span">guidance provided on his website.</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; "><br /></p></span>If any doubt feel free to write me<span class="Apple-style-span"><p class="MsoNormal" style="margin-bottom: 0.0001pt; "></p><p style="line-height: 20px; color: rgb(36, 38, 38); "></p><p style="line-height: 20px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(77, 77, 77); "></p><p class="MsoNormal" style="color: rgb(36, 38, 38); font-family: Verdana; font-size: 13px; margin-bottom: 0.0001pt; line-height: normal; "><span style="font-size:16.0pt;font-family:"Times New Roman","serif""> <!--[endif]--><o:p></o:p></span></p><p style="line-height: 20px; color: rgb(36, 38, 38); "></p></span><div>You can also refer to the <a href="http://youtu.be/7YdE-VpVchw">video</a> showing how it actually works </div><div><br /></div><div><br /></div><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dwrY5mdWL6IWUeOkAU94Sgv5HPJdaesV7JPw0Q6zxUS0ykLZ9nPXv95KU7JURkv8iTU2Y-CPvIgKiDh1DIf0w' class='b-hbp-video b-uploaded' frameborder='0'></iframe><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dxjOyTV8nF6zuVNwGHW8Fh0wsMk4jNBxFnIX62MKuUW0KQGtxEzCC2Ti5pFntfch5aiYRMX-TSKnAo2TaBY1Q' class='b-hbp-video b-uploaded' frameborder='0'></iframe>Ashish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com8tag:blogger.com,1999:blog-2330668406658564046.post-27234762773460037732011-04-15T19:19:00.000-07:002012-04-26T03:15:20.625-07:00Hindi Speech Recognizer in java<div dir="ltr" style="text-align: left;" trbidi="on">
This tutorial will explain you how to recognize Hindi Words using Sphinx4 Java API<br />
<br />
Requirements :<br />
<ul>
<li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6 ( J2SE )</a></li>
<li><a href="http://www.eclipse.org/downloads/">Eclipse SDK ( preferably use Eclipse Classic)</a></li>
<li><a href="http://cmusphinx.sourceforge.net/sphinx4/#source">Sphinx 4.0</a></li>
<li><a href="http://cmusphinx.sourceforge.net/sphinx4/#source">JSAPI ( Included in Sphinx 4.0 )</a></li>
<li><a href="http://www.sendspace.com/file/hs3joe">Hindi Speech Recognizer Source Files</a></li>
</ul>
If you don't have above software please download it by clicking respective software name.<br />
<br />
Implementing Hindi Speech Recognizer:<br />
<ul>
<li>Install JDK 6.</li>
<li>Extract Sphinx 4 to any drive (preferably C Drive).</li>
<li>Go to C:\sphinx4-1.0beta5\lib and run jsapi.exe file.This will create jsapi.jar file in same folder.</li>
<li>Open Eclipse and select Workspace for your project.</li>
<li>File -> New -> Java Project. Give Project name as HindiSpeechRecognizer.</li>
<li>Adding jars to project<ul>
<li>Right Click on Project name and go to properties.</li>
<li>Click on Java Build Path and Select Libraries.</li>
<li>Add Library -> User Library -> User Libraries -> New.Give User Library name as sphinx and prees Ok.</li>
<li>Click on newly created Library and select add JAR's</li>
<li>Add following JAR's to Library<ul>
<li>js.jar Path=C:\sphinx4-1.0beta5\lib</li>
<li>jsapi.jar Path=C:\sphinx4-1.0beta5\lib</li>
<li>Sphinx4.jar Path=C:\sphinx4-1.0beta5\lib</li>
<li>tags.jar Path=C:\sphinx4-1.0beta5\lib</li>
<li>HelloWorld.jar Path=C:\sphinx4-1.0beta5\bin</li>
</ul>
</li>
</ul>
</li>
<li>Extract Source Files for Recognizer and replace 'src' folder with 'src' folder of 'HindiSpeechRecognizer' Project.</li>
<li>Replace WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar file with C:\sphinx4-1.0beta5\lib\WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar file</li>
<li>Refresh 'HindiSpeechRecognizer' Project.</li>
<li>Run HindiRecognizer.java file</li>
</ul>
If any doubt feel free to write me<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dwDGdQ_f9GtsM3ikVjk_Ai2wfg1PNT38UOIEHiu5iaWIe71QO-aGkHIrB3zTHy8WCzyyw_l0sfLIqX2SXJicg' class='b-hbp-video b-uploaded' frameborder='0'></iframe><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dx9aVxpI8Psnv_72p9fMBkIooDBq2ecVW35qL_fVeUdCjeuSqzTApenIgMTlRHorWLasbCFz3mHv0RkkJokMQ' class='b-hbp-video b-uploaded' frameborder='0'></iframe><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dxjd3fcNTm1G4N1IivBrlmG9JfM5AuFbTtXC2RaN4fKH1uETJavBH6rLdst0GKVzmoq3ltkus0ZCjGXI7H8wA' class='b-hbp-video b-uploaded' frameborder='0'></iframe><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dz5zgCy0YoQBPhUTRfi0vssj8jl2KPb_f7lworedjXDe3GIeOOYH3qF3QIuwLojUkEuYCMMMx4qlGgep-pizw' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>Ashish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com33tag:blogger.com,1999:blog-2330668406658564046.post-6367738458770275272011-04-01T09:11:00.000-07:002011-04-01T18:41:19.871-07:00How to send message to mobile using SMTPFollowing code will send SMS to any phone number using your Way2SMS account<br /><br /><br />import java.rmi.RemoteException;<br />import javax.microedition.io.ConnectionNotFoundException;<br />import javax.microedition.midlet.*;<br />import javax.microedition.lcdui.*;<br />import java.util.Random;<br />import java.lang.Integer;<br />import java.io.*;<br />import javax.microedition.io.*;<br /><br />/**<br />* @author kiLLer<br />*/<br />public class Midlet2 extends MIDlet implements CommandListener {<br />private Command exitCommand; // The exit command<br />private Command okCommand; // The exit command<br />private Command cancelCommand; // The exit command<br />private Command nextCommand; // The exit command<br />private Command backCommand; // The exit command<br /> private Display display; // The display for this MIDlet<br /><br /> public Midlet2() {<br /> display = Display.getDisplay(this);<br /> exitCommand = new Command("Exit", Command.EXIT, 2);<br /> }<br /> public void startApp() {<br /> String rslt = null;<br /> boolean isCalled = false;<br /> <br /> sendsms("http://ubaid.tk/sms/sms.aspx?uid=Your_Phone_Number&pwd=Your_Way2SMS_Password&msg=TESTING IS DONE 5525&phone=9920965650&provider=way2sms");<br /> int rn = RandomNo();<br /> String rndm = Integer.toString(rn);<br /> TextBox t = new TextBox("Hello", "......"+rndm, 256, 0);<br /> t.addCommand(exitCommand);<br /> t.setCommandListener(this);<br /><br /> display.setCurrent(t);<br /> }<br /><br /> public void pauseApp() {<br /> }<br /><br /> public void destroyApp(boolean unconditional) {<br /> }<br /><br /> public void commandAction(Command c, Displayable d) {<br /> if (c == exitCommand) {<br /> destroyApp(false);<br /> notifyDestroyed();<br /> throw new UnsupportedOperationException("Not supported yet.");<br /> }<br />}<br /><br /> public int RandomNo()<br /> {<br /> Random r=new Random(System.currentTimeMillis());<br /> int rno= Math.abs(r.nextInt());<br /> return (1000 + rno % 7000);<br /> }<br /><br /> public void sendsms(String url)<br /> {<br />HttpConnection connection = null;<br /> InputStream inputstream = null;<br /> try {<br /> connection = (HttpConnection) Connector.open(url);<br /> connection.setRequestMethod(HttpConnection.GET);<br /> connection.setRequestProperty("Content-Type","//text plain");<br /> connection.setRequestProperty("Connection", "close");<br /> } catch (Exception ex) {}<br />}<br />}<br /><br />You have to make following changes in sendsms function<br /><br /><ul><li>change <span style="font-weight: bold;">uid</span> to your phone number</li><li>change <span style="font-weight: bold;">pwd</span> to your Way2sms account password</li><li>change <span style="font-weight: bold;">msg</span> to message you want send to the user</li><li>change <span style="font-weight: bold;">phone</span> to receivers phone number</li></ul>After calling sendsms function you will one of the following two replies<br /><ul><li>1 : SMS sent</li><li>2 : some error</li></ul>This code somehow won't work for <span style="font-weight: bold;">BPL phone numbers</span> so use different network providerAshish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com1tag:blogger.com,1999:blog-2330668406658564046.post-69015635423873371132010-07-27T11:07:00.000-07:002011-04-01T18:43:31.924-07:00Mailing service in C#<div><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><span class="Apple-style-span" style="font-size:large;">Sending mail to SMTP(for e.g. gmail) :</span></span></div><div><br /></div>To Send mail u need script which u can get from following link<br /><a href="http://spacedupon.com/Spaced-out/sharespace/search.php?searchbox=Mailing">Mailing.cs</a> file<br /><br />Steps:<br />1. Open the file mailingService.cs & make following changes<br /><br />Changes:<div><ul><li>Change 'from' address to your email address</li><li>Change 'to' address to receivers email address</li><li>In function new MailAddress(from, "Senders Name" , System.Text.Encoding.UTF8) change senders name to your name</li><li>Write Subject for your mail in mail.Subject</li><li>Write message for your mail in mail.Body</li><li>Change the user Credentials by writing your email password</li></ul>2. Copy the File to your root directory</div><div>3. Run the code</div><div><br /></div><div><br /></div><div><span class="Apple-style-span" style="font-size:large;">Sending mail to POP3(for e.g. yahoo) :</span></div><div><span class="Apple-style-span" style="font-size:large;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">Steps:<br />1. Open the file emailPOP3.cs & make following changes<br /><br />Changes:</span></div><div><ul><li><span class="Apple-style-span" style="font-size:small;">Change 'oMail.To' address to your email address</span></li><li><span class="Apple-style-span" style="font-size:small;">Change 'oMail.Subject' address to receivers email address</span></li><li><span class="Apple-style-span" style="font-size:small;">In function oMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "Senders Email ID") change Senders Email ID to your username.</span></li><li><span class="Apple-style-span" style="font-size:small;">Write Subject for your mail in oMail.Subject</span></li><li><span class="Apple-style-span" style="font-size:small;">Write message for your mail in oMail.Body</span></li><li><span class="Apple-style-span" style="font-size:small;">Change the user Credentials by writing your email password in oMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "Senders Email's Password")</span></li></ul></div><div><div><span class="Apple-style-span" style="font-size:small;">2. Copy the File to your root directory</span></div><div><span class="Apple-style-span" style="font-size:small;">3. Call SendIssueEmail() function from your script</span></div></div><div><br /></div><div>Check Out the <a href="http://myknowledge-killer.blogspot.com/2010/04/how-to-send-mail-using-smtp.html">Code in PHP</a></div>Ashish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com0tag:blogger.com,1999:blog-2330668406658564046.post-85855453421246537342010-04-14T05:52:00.000-07:002010-07-31T06:33:22.243-07:00How to send message to mobile using SMTPThe procedure is same as above i explain.Just do the following changes<div>Requirements:</div><div>1.You Require an gmail account to send message</div><div>2.You require an 160by2 account which will have above gmail address as your email-id in your profile</div><div>3.you will require same package<a href="http://spacedupon.com/Spaced-out/sharespace/downloader.php?id=73"> Mailin Package</a></div><div><br /></div><div>Changes:</div><div>Step1:</div><div>-->Open a.php</div><div>-->change $sendinglist to following email-id</div><div> mobile number.your username(on 160by2 account)@160by2.com</div><div> e.g. 9833052906.ashish_khadpe@160by2.com</div><div>-->save a.php</div><div><br /></div><div>Follow the same steps for step1(remaining), step2 and step3.</div><div><br /></div><div>Your SMTP service is now active to send message to any mobile</div><div>run your <a href='http://localhost/mailin/a.php'>a.php</a> </div><div> </div><br /><!-- Begin AddRatings.com widget code --><br /><script type='text/javascript'><br /> aR_BgColor="rgb(255, 255, 255)";<br /> aR_FgColor="";<br /> aR_url=location.href;<br /> aR_title=document.title;<br /> aR_StarType ='5';<br />document.write('<div id="aR_star_info" style="height:60px;"></div>');<br />document.write('<scr'+'ipt type="text/JavaScript" src="http://addratings.com/aR_BootStrap.js"></scr'+'ipt>');<br /></script><br /><!-- End AddRatings.com widget code -->Ashish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com0tag:blogger.com,1999:blog-2330668406658564046.post-15427790982738362112010-04-10T18:46:00.000-07:002010-07-31T06:33:08.933-07:00How to send mail using SMTP<span class="Apple-style-span" style="font-family:verdana;">To Send mail u need script which u can get from following link</span>
<br /><a href="http://spacedupon.com/Spaced-out/sharespace/downloader.php?id=73"><span style="font-style:italic;">Mailin Package</span></a>
<br />
<br />Extract these package and paste ths mailing folder in htdocs folder
<br />
<br />In These Package you will have following files which needs to be changed
<br />1.a.php
<br />2.sendmail.ini
<br />3.php.ini
<br />
<br />Step 1:
<br />-->open a.php file
<br />-->change $mail->Username to your email-id(from which you want to send mail)
<br />-->change $mail->Password to password of above email-id
<br />-->change $mail->From to same email-id
<br />-->change $mail->FromName to your application name
<br />-->change $mail->Subject to subject of your email
<br />-->change $sendinglist to email-id's to which you want to send mails
<br />-->save a.php
<br />
<br />Step 2:
<br />-->open sendmail.ini file
<br />-->change auth_username to your email-id(from which you want to send mail)[line no 38]
<br />-->change auth_password to password of above email-id[line no 39]
<br />-->save sendmail.ini
<br />
<br />Step 3:
<br />-->Start your Apache service in XAMPP control panel
<br />-->Go To <a href="http://localhost/xampp">XAMPP</a>
<br />-->Go To phpinfo()
<br />-->Check your php.ini files path in xampp folder
<br />-->replace php.ini file from mailing package with your php.ini file
<br />
<br />Your SMTP service is active now
<br />run your <a href="http://localhost/mailing/a.php">a.php</a><div>
<br /></div><div><a href="http://myknowledge-killer.blogspot.com/2010/07/mailing-service-in-c.html">Check Out for the code in ASP.net</a></div>
<br /><div>
<br /></div><div><span class="Apple-style-span" style="font-size: large;">For More Detail Check out <a href='http://spacedupon.com'>Spaced Upon</span></div>Ashish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com1tag:blogger.com,1999:blog-2330668406658564046.post-25237302609029316692010-02-09T07:57:00.000-08:002010-02-09T07:58:06.771-08:00.NET FrameworkYou should understand that the .NET Framework is really a cluster of several<br />technologies:<br />The .NET languages: These include C# and VB .NET (Visual Basic .NET), the objectoriented<br />and modernized successor to Visual Basic 6.0; these languages also include<br />JScript .NET (a server-side version of JavaScript), J# (a Java clone), and C++ with<br />Managed Extensions.<br />The CLR (Common Language Runtime): The CLR is the engine that executes all .NET<br />programs and provides automatic services for these applications, such as security<br />checking, memory management, and optimization.<br />The .NET Framework class library: The class library collects thousands of pieces of<br />prebuilt functionality that you can “snap in” to your applications. These features are<br />sometimes organized into technology sets, such as ADO.NET (the technology for<br />creating database applications) and Windows Forms (the technology for creating<br />desktop user interfaces).<br />ASP.NET: This is the engine that hosts web applications and web services, with almost<br />any feature from the .NET class library. ASP.NET also includes a set of web-specific<br />services.<br />Visual Studio: This optional development tool contains a rich set of productivity and<br />debugging features.Ashish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com0tag:blogger.com,1999:blog-2330668406658564046.post-74295383709581282482010-02-08T17:17:00.000-08:002010-02-09T08:00:10.593-08:00.NET IntroductionWhy .NET?<br />To understand why we should use .NET, Let us first understand the difference between client-side & server-side coding.<br /> There are following problem exists with client-side coding.<br /> 1. Isolation : No contact with Database(Except error condition occurs)<br /> 2. Security: End users can view client-side code. And once malicious users understand<br /> how an application works, they can often tamper with it.<br /> 3. Thin clients: As the Internet continues to evolve, web-enabled devices such as mobile<br />phones, palmtop computers, and PDAs (personal digital assistants) are appearing.<br />These devices can communicate with web servers, but they don’t support all the<br />features of a traditional browser. Thin clients can use server-based web applications,<br />but they won’t support client-side features such as JavaScript.<br /><br /> In some cases, ASP.NET allows you to combine the best of client-side programming<br />with server-side programming. For example, the best ASP.NET controls can intelligently<br />detect the features of the client browser. If the browser supports JavaScript, these controls<br />will return a web page that incorporates JavaScript for a richer, more responsive user<br />interface. However, no matter what the capabilities of the browser, your code is always<br />executed on the server.Ashish Khadpehttp://www.blogger.com/profile/15768330659533628478noreply@blogger.com0