Recursion : Tower of Hanoi in C++

Tower of Hanoi by recursion

#include <iostream>
using namespace std;
int main()
{

C++ implementation of Circular Queue

C++ implementation of Circular Queue

#include <iostream.h>
#include <conio.h>
#define size 10

class queue
{

C++ implementation of front end fix and rear end vary queue

C++ implementation of front end fix and rear end vary queue

#include <iostream.h>
#include <conio.h>
#define size 10

class queue
{

C++ implementation of front and rear end varying queue

C++ implementation of front and rear end varying queue

#include <iostream.h>
#include <conio.h>
#define size 10

class queue
{

C++ implementation of top varying stack

C++ implementation of top varying stack

#include <iostream.h>
#include <conio.h>
#define size 10
using namespace std;
class stack
{

C++ implementation of fixed top stack

C++ implementation of fixed top stack

#include<iostream.h>
#include<conio.h>
#definesize 10
class stack
{
    int tos;
    int item[size];
    int pos;

List of good references for Speech / Speaker Recognition Project

Here is list of good references , that we followed for our final project. These  are also included in reference section of final report. 
After we decided to do final project on joint speech and speaker recognition, we did a lot of research and downloaded almost 2 GB of articles, lecture notes and etc. But, these article(around 30 MB) were really useful to us.
All of them are available on Web for free. Just google it.


  1. Assignment 3: GMM Based Speaker Identification EN2300 Speech Signal Processing, [ www.kth.se/polopoly_fs/1.41342!assignment_03.pdf]
  2. Conrad Sanderson, Automatic Person Verification Using Speech and Face Information - A Dissertation Presented to The School of Microelectronic Engineering Faculty of Engineering and Information Technology, Griffith University, August 2002, [revised February 2003].
  3. Douglas A Reynolds and Richard C Rose, Robust text-independent speaker identification using Gaussian mixture speaker models. IEEE Transactions on Speech and Audio Processing, 3(1):72–83, 1995.
  4. G. Saha, Sandipan Chakroborty, Suman Senapati , A New Silence Removal and Endpoint Detection Algorithm for Speech and Speaker Recognition Applications, Department of Electronics and Electrical Communication Engineering, Indian Institute of Technology, Khragpur, Kharagpur, India.
  5. J P Campbell, Jr. Speaker recognition: A tutorial. Proc. IEEE, 85(9):1437–1462, 1997.
  6. K.R. Aida–Zade, C. Ardil and S.S. Rustamov, Investigation of Combined use of MFCC and LPC Features in Speech Recognition Systems, World Academy of Science, Engineering and Technology, 2006
  7. L. R. Rabiner, “A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition”, vol-77, no. 2, pp. 257-286, 1989.
  8. Lasse L Mølgaard, Kasper W Jørgensen, Speaker Recognition: Special Course; IMM-DTU; 2005
  9. Mohamed Faouzi  BenZeghibaa , Joint Speech and Speaker Recognition,IDIAP  Research  Report, 2005.
  10. Robin Teo Choon Guan @ Myo Thant, Majority Rule- Based Non-Intrusive User Authentication by Speech: Part 2 (Speaker Verification), Thesis, School of Science and Technology, Sim University,2009.
  11. Shi-Huang Chen and Yu-Ren Luo , Speaker Verification Using MFCC and Support Vector Machine, Proceedings of the International Multi Conference of Engineers and Computer Scientists 2009, vol – I, IMECS 2009.
  12. Tomi Kinnunen , Spectral Features for Automatic Text-Independent Speaker Recognition- Licentiate’s Thesis, University of Joensuu, Department of Computer Science, Finland, 2003.
  13. Waleed H. Abdulla and Nikola K. Kasabov, The Concepts of Hidden Markov Model in Speech Recognition, Knowledge Engineering Lab, Department of Information Science, University of Otago,New Zealand, 1999.

save an Android application's state and restore

The savedInstanceState way for saving state associated with a current instance of an Activity, for example - current navigation, selections, unsaved text.. etc, so that if Android destroys and recreates an Activity, it can come back as it was before.

We should override onSaveInstanceState(Bundle savedInstanceState) and write the application state values you want to change to the Bundle parameter like this:

@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
  // Save UI state changes to the savedInstanceState.
  // This bundle will be passed to onCreate if the process is
  // killed and restarted.
  savedInstanceState.putBoolean("MyBoolean", true);
  savedInstanceState.putDouble("myDouble", 1.9);
  savedInstanceState.putInt("MyInt", 1);
  savedInstanceState.putString("MyString", "Welcome back to Android");
  // etc.
  super.onSaveInstanceState(savedInstanceState);
}

This stores the values into  Bundle in a NVP ("Name-Value Pair") map, and it will get passed in to onCreate and also onRestoreInstanceState.

Extract the values stored:

@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
  super.onRestoreInstanceState(savedInstanceState);
  // Restore UI state from the savedInstanceState.
  // This bundle has also been passed to onCreate.
  boolean myBoolean = savedInstanceState.getBoolean("MyBoolean");
  double myDouble = savedInstanceState.getDouble("myDouble");
  int myInt = savedInstanceState.getInt("MyInt");
  String myString = savedInstanceState.getString("MyString");
}

Silence Removal and End Point Detection JAVA Code

For the purpose of silence removal of captured sound, we used the algorithm  in our final year project. In this post, I am publishing the endpoint detection and silence removal code ( implementation of this algorithm in JAVA).

These links might be useful to you as well.
The constructor of following java class EndPointDetection takes two parameters
  1. array of original signal's amplitude data : float[] originalSignal
  2. sampling rate of original signal in Hz : int samplingRate
The Java Code :
package org.ioe.tprsa.audio.preProcessings;

declare global variable in android- example code

To declare global variable in android, you need to 
1) create your own subclass of android.app.Application
2) and then specify that class in the application tag in your manifest. 
Android will automatically create an instance of that class and make it available for your entire application. You can access it from any context using the Context.getApplicationContext() method (Activity also provides a method getApplication() which has the exact same effect):
  • Sub Class of Application :
     public class MyApp extends Application {
           String foo;
      }
  • In the AndroidManifest.xml add android:name
 <application 
     android:icon="@drawable/icon" 
     android:label="@string/app_name" 
     android:name="com.company.MyApp">
  </application>

Full Example :