00001 package edu.stanford.hci.r3.devices.channels; 00002 00003 import java.io.File; 00004 00005 import edu.stanford.hci.r3.actions.types.PlaySoundAction; 00006 import edu.stanford.hci.r3.actions.types.TextToSpeechAction; 00007 import edu.stanford.hci.r3.devices.Device; 00008 00019 public class AudioChannel { 00020 00021 private Device parentDevice; 00022 00023 public AudioChannel(Device device) { 00024 parentDevice = device; 00025 } 00026 00030 public void playSoundFile(File sound) { 00031 PlaySoundAction action = new PlaySoundAction(sound); 00032 parentDevice.invokeAction(action); 00033 } 00034 00038 public void readTextOutLoud(String text) { 00039 TextToSpeechAction action = new TextToSpeechAction(text); 00040 parentDevice.invokeAction(action); 00041 } 00042 }