"I Think, I Conceptualize, I Analyze, I Design, and I Create." ~ Puneet Kalra

Cognitive Robotics Research Centre Of University Of Wales, Newport Puneet Kalra

Home Studies Research Projects Tutorials Portfolio

Puneet Kalra - www.puneetk.com - Socializing Robots

Video Capturing In Java Using JMF

February 7th, 2010 by Puneet Kalra 23 comments »

Hello Everyone,

I’m back with something new, while exploring Java and this time the API is : Java Media Framework (JMF).

Well this time I’m going to share how you can create Video Capturing Application Or you can say a Webcam in Java using JMF API.

Here’s a cap :
Cap Of Video Capturing Application Created In Java

No more words and without wasting more time. Lets get to the main point.

Here’s the code :  Click Here
Comments on all main lines of code are provided in file.

More to come soon!..

Statistics Day !

February 2nd, 2010 by Puneet Kalra No comments »

Statistics for Puneet Kalra’s Blog

  • 400 Successful Days
  • Single Domain ( puneetk.com )
  • Hosted by 2 Webhosts ( servage & globat )
  • Faced 1 Server crash
  • 7 major projects
  • 2 open source projects ( pikk & pwing )
  • 20 articles published
  • Used 3 wordpress themes
  • 69 comments posted
  • 4000+ spam comments ( 270+ spam on pending )
  • Visitors from 55 countries ( 220 cities, Mostly from India, USA, UK, Israel, Germany & Chile )
  • 2530 Visits and 6583 Pageviews
  • 554 Unique Followers
  • 310 relative searches on Google
  • 121 pages cached by Google
  • and thousands of hours spent on exploring java and other technologies..

Happy Statistics Day! :D

Another Open Source Project (Pwing)

January 28th, 2010 by Puneet Kalra 1 comment »

Finally,

We have published “Pwing”, An other Open Source project.

Pwing Logo Pwing is a GUI toolkit, Is a set of widgets/components for use in designing applications with graphical user interfaces (GUI’s). It is based on Swing toolkit, part of Sun Microsystem’s Java Foundation Classes (JFC) API. It is developed to provide a better set of components to create more interactive GUI based applications in Java. Each component facilitates a specific user-computer interaction, and appears as a visible part of the computer’s GUI.
 

Pwing Example

 



Examples, Executable JAR’s , Source JAR’s and Complete package is available for download.


Official Pwing Website : http://puneetk.com/pwing
Pwing’s SF Website : http://sourceforge.net/projects/pwing/


Regards,

Pwing

January 22nd, 2010 by Puneet Kalra 1 comment »
Pwing - Custom GUI for Java

Pwing - Custom GUI for Java

Introducing Pwing ..

Pwing is a GUI toolkit, Is a set of widgets/components for use in designing applications with graphical user interfaces (GUI’s). It is based on Swing toolkit, part of Sun Microsystem’s Java Foundation Classes (JFC) API. It is developed to provide a better set of components to create more interactive GUI based applications in Java. Each component facilitates a specific user-computer interaction, and appears as a visible part of the computer’s GUI.

Pwing is currently being developed by a merge team of my trainees and Parul Kalra’s trainees at MBN Informatics. Soon it will be published as Open Source project on SourceForge.

Stay tuned !

Expanding Dictionary Of Acoustic Model

January 5th, 2010 by Puneet Kalra 60 comments »

Hello Everyone,

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.

Important Files in this example :
1 ) HelloWorld.java
2) hello.gram
3) helloworld.config.xml

Acoustic Model used in this example :
WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar

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.

PART ONE
Step 1 :
Create a txt file “words.txt”, Write all the names of cities and states in it and save.
Step 2 : Open this link : http://www.speech.cs.cmu.edu/tools/lmtool.html
Step 3 : On that page, go to “Sentence corpus file:” section, Browse to “words.txt” file and click “Compile Knowledge Base”.
Step 4 : On next page, Click on “Dictionary” link and save that .DIC file.

PART TWO
Step 1 : Extract WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar file.
Step 2 : Go to edu\cmu\sphinx\model\acoustic\WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz\dict folder.
Step 3 : Open “cmudict.0.6d” file in that folder.
Step 4 : Copy data from .DIC file, you have downloaded in PART ONE, paste it in “cmudict.0.6d” file and save.
Step 5 : Zip the extracted hierarchy back as it was and Zip file named should be same as JAR file.

Now, remove “WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar” file from Project’s CLASSPATH and add “WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.zip” instead of it.

That’s it ! We are done.  Now Sphinx will also recognize all name of cities and states that we wrote in “words.txt” file.
Now, FAQ time. I will be posting FAQ and few important notes in comments. :)

If you have any quires, Please feel free to ask.
Regards,