Tuesday, September 25, 2012

Getting ready for first review

0 comments
   Weeks went and we have finished voice recognition in Android portion of the project in Android . So we are planning to report it on first review. So next plan is to code image processing utils. here after. And also we are now familiar with Git SCM. We use Gitorious repo for our project, here is it: Repository for Athena[https://gitorious.org/athena/athena]
Read more ►

Monday, September 24, 2012

Git Simple Commands

0 comments

I keep forgetting how to push files and pull them down. So, this post is for my reference to use GIT.

Adding files to the remote repo


1. Adding the folder(or file) => git add <filename>
2. Checking status of git (confirm whether it is staged) => git status
3. Commiting => git commit -a



4. Pushing the files into remote repo => git push




5. Listing the files (not necessary)



Pulling down files from remote to local repo



Read more ►

Thursday, September 6, 2012

Started with Speech Recognition

0 comments

Couldn't finish up with the bluetooth part of the project. Will deal with it on a good day ( hopefully next week). Luckily, I'm gonna have 9 days OFF. Next week, TCS and HCL companies are coming to the college for Campus Selection. A lot of people get selected in that (here, every Btech student's last hope is TCS), so, we were given a week off for preparation. Anyways its not my issue. Coming back to Speech Recognition.

I used the speech recognition API provided by Android - simple, easy and perfect. Works better than what i thought. One drawback is that it uses an Internet (google) service to identify speech and convert it to words. We are planning to use Pocket-Sphinx in the future where the signal processing is done on-board but the drawback in that is that it has high RAM requirements. It takes quite some time to recognize words from speech even when I tested it on my PC (4GB RAM). Lets see about it in the future. For now, this will do.

Some of the images in my app:

 



As you can see above, there is a list of strings returned. Actually the intent returns an ArrayList<String>, which is added to the ListView as ArrayAdapter. I'm planning to store all the possible commands (to be sent from Android->uC) in the database and when the user gives a command through speech, we iterate through the ArrayList returned by the intent using ArrayList.Iterator() and look for a possible match in the database. It requires an efficient algorithm to search the database and find the match. Then, the matched command is sent to the uC. I believe that this idea is better than OK. 

A chunk of code for iterating through the ArrayList and looking for Integers:


  1. protected void onActivityResult(int requestCode, int resultCode, Intent data)
  2. {
  3.         if(requestCode==check && resultCode==RESULT_OK)
  4.         {
  5. ArrayList<String> results=data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
  6.                        
  7.         while(results.iterator().hasNext())
  8.         {
  9.                 String temp=results.iterator().next().toString();
  10.                                
  11.                 if(isInteger(temp))
  12.                 {
  13.                         tvSpeechResult.setText(temp);
  14.                         break;
  15.                 }
  16.         }      
  17.                                
  18.         }
  19.         super.onActivityResult(requestCode, resultCode, data);
  20. }
  21.        
  22. public boolean isInteger(String ip)
  23. {
  24.        
  25. try {
  26.                        
  27.         Integer.parseInt(ip);
  28.        
  29.         return true;
  30. } catch (Exception e) {
  31.         return false;
  32.     }
  33.                
  34.                
  35. }



Hoping to get back to the Bluetooth API soon...


Read more ►

Sunday, September 2, 2012

Working on Bluetooth API

0 comments

Still working on the Bluetooth app for android. Unfortunately Bluetooth protocol is complicated. Going through the Bluetooth Chat sample code. So far so good. Took some screenshots












 
 



So far the app can enable/disable bluetooth, display paired devices, get hold of a device , print its name and its address. Just need to add communication functionality. I hope to complete this app tonite. 


Read more ►
 

Copyright © Project Athena Design by O Pregador | Blogger Theme by Blogger Template de luxo | Powered by Blogger