// $Id: ViaVoiceImpl.java,v 1.1 2004/02/25 17:29:18 cadlerun Exp $
// ViaVoiceImpl.java -- 
// Author: Aaron Adler <cadlerun@fracas.ai.mit.edu> 
// Copyright: Copyright (C) 2002 by Aaron Adler 
// Created: <Wed Feb 18 11:31:53 2004> 

package rec.multi;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import org.apache.log4j.Logger;
import edu.mit.tools.watch.Logging;

public class ViaVoiceImpl extends UnicastRemoteObject implements ViaVoiceInterface, SpeechInput {

  private static Logger LOG = Logging.SPEECH;
  private MultiModal m_multi;
  
  public ViaVoiceImpl(MultiModal multi) throws RemoteException {
    super();
    
    LOG.debug("creating new viavoice");
    
    m_multi = multi;

    m_multi.setReady(true); // ready to go!
  }

  /**
   * Abort the listening.
   */
  public void abort() {
    LOG.info("aborting the connection (really not doing anything)");
  }
  
  public void incomingSpeech(String speech, long startTime, long endTime) {
    LOG.debug("the impl got "+speech+" "+startTime+"-"+endTime);
    m_multi.addSpeech(speech, startTime, endTime);
  }
}
