public void scanForSpeech(byte[] dataBuffer) {
		ByteArrayOutputStream speechData = new ByteArrayOutputStream();
		boolean isSpeech = false;
		int tailIndex = 0;
		for (int headIndex = 79; headIndex < dataBuffer.length; headIndex= headIndex+80) {
			// process this segment
			byte[] currentBuffer = Arrays.copyOfRange(dataBuffer, tailIndex, headIndex);
			int zeroCross = this.getSingleZeroCrossing(currentBuffer);
			int energy = this.sumEnergyInSingleSegment(currentBuffer);
			// check if we currently detect speech
			if (false == isSpeech) {
				// check the buffer for the start of a new word
				if (this.getIZCT() < zeroCross) {
					try {
						speechData.write(currentBuffer);
					} catch (IOException e) {
						System.out.println("Failed to write data to ByteArrayOutputStream");
						e.printStackTrace();
					}
					isSpeech = true;
				}
			}
			else {
				// check the buffer for the end of current word
				if (energy > this.getITU() && zeroCross > this.getIZCT()){
					try {
						speechData.write(currentBuffer);
					} catch (IOException e) {
						System.out.println("Failed to write data to ByteArrayOutputStream");
						e.printStackTrace();
					}
				}
				else {
					isSpeech = false;
				}
			}
			tailIndex = headIndex;
		}
		
		// create the output files with the reduced data set
		this.computeAmplitudes(speechData.toByteArray(), this.speechDataPath);
		audioAssistant.writeFile(speechData.toByteArray(), this.speechRawPath);
	}