Tuesday, 8 April 2014

using microphone to talk with your computer - Java


import com.gtranslate.Translator;

import edu.cmu.sphinx.frontend.util.Microphone;
import edu.cmu.sphinx.recognizer.Recognizer;
import edu.cmu.sphinx.result.Result;
import edu.cmu.sphinx.util.props.ConfigurationManager;


/**
 * A simple HelloWorld demo showing a simple speech application built using Sphinx-4. This application uses the Sphinx-4
 * endpointer, which automatically segments incoming audio into utterances and silences.
 */
public class Test1 {

    public static void main(String[] args) {
    com.gtranslate.Translator translate = Translator.getInstance();
        String prefix = translate.detect("I am a bus");
        System.out.println(prefix); //en
       
       
        ConfigurationManager cm;

        if (args.length > 0) {
            cm = new ConfigurationManager(args[0]);
        } else {
            cm = new ConfigurationManager(Test1.class.getResource("helloworld.config.xml"));
        }

        Recognizer recognizer = (Recognizer) cm.lookup("recognizer");
        recognizer.allocate();

        // start the microphone or exit if the programm if this is not possible
        Microphone microphone = (Microphone) cm.lookup("microphone");
        if (!microphone.startRecording()) {
            System.out.println("Cannot start microphone.");
            recognizer.deallocate();
            System.exit(1);
        }

        System.out.println("Say: (Good morning | Hello) ( Bhiksha | Evandro | Paul | Philip | Rita | Will )");

        // loop the recognition until the programm exits.
        while (true) {
            System.out.println("Start speaking. Press Ctrl-C to quit.\n");

            Result result = recognizer.recognize();

            if (result != null) {
                String resultText = result.getBestFinalResultNoFiller();
                System.out.println("You said: " + resultText + '\n');
            } else {
                System.out.println("I can't hear what you said.\n");
            }
           
        }
    }
}

Monday, 2 December 2013

Release Management

A manager's roles are:
  • Facilitator: serves as a liaison between varying business units to promote smooth and timely delivery of software products or updates.
  • Gatekeeper: “holds the keys” to production systems/applications and takes responsibility for their implementations.
  • Architect: helps to identify, create and/or implement processes or products to efficiently manage the release of code.
  • Server application support engineer: help troubleshoot problems with an application (although not typically at a code level).
  • Coordinator: utilized to coordinate disparate source trees, projects, teams and components.

Some of the challenges facing a software release manager include the management of:
  • Software defects
  • Issues
  • Risks
  • Software change requests
  • New development requests (additional features and functions)
  • Deployment and packaging
  • New development tasks

Setup mysql

Setup Gerrit

Gerrit plays a significant role for software life cycle, in this blog i will talk about how to write plugin for gerrit.
http://www.slideshare.net/lucamilanesio/gerrit-how-to-cook-a-plugin-in-only-10-mins#
Above slides are not going to work as it is you need to follow some diversions:

M2_HOME=/usr/local/apache-maven/apache-maven-3.0.5
M2=/usr/local/apache-maven/apache-maven-3.0.5/bin
JAVA_HOME=/usr/lib/jvm/java-8-oracle
setenv PATH /usr/local/apache-maven/apache-maven-3.0.5/bin:$PATH


cd gerrit/gerrit-plugin-archetype/ && mvn install && cd ../..


 $mvn archetype:generate -DarchetypeGroupId=com.google.gerrit -DarchetypeArtifactId=gerrit-plugin-archetype -DgerritApiVersion=2.5 -DgroupId=com.gerritforge -Dversion=1.0-SNAPSHOT -DImplementaion-Url=http://gerritforge.com -DImplemention-Vendor=GerritForge -DartifactId=plugin10mins -DpluginName=plugin10mins

$cd plugin10mins/
$mvn package



Useful Links:
http://wiki.eclipse.org/JGit/User_Guide#Building_the_JGit_CLI


OpenGrok helps in code browsing and helps significantly in software development
How to setup install and use:
https://github.com/OpenGrok/OpenGrok/wiki/How-to-install-OpenGrok
https://github.com/OpenGrok/OpenGrok/blob/master/doc/EXAMPLE.txt
http://blog.vinceliu.com/2008/06/installing-opengrok-on-ubuntu-linux.html
https://github.com/OpenGrok/OpenGrok/wiki/How-to-install-OpenGrok


Setup Gitlite:
http://hron.me/blog/2013/01/gitiles-install-howto/