/src/main/java/uk/ac/cam/ch/ami/AmiVoice.java

https://bitbucket.org/jat45/ami · Java · 28 lines · 14 code · 7 blank · 7 comment · 1 complexity · 411d73944eed21e7aa1f95ea5feeef60 MD5 · raw file

  1. package uk.ac.cam.ch.ami;
  2. import java.util.List;
  3. /**
  4. * Created by IntelliJ IDEA.
  5. * User: Matthew
  6. * Date: 13-Dec-2010
  7. * Time: 17:02:14
  8. * To change this template use File | Settings | File Templates.
  9. */
  10. public class AmiVoice {
  11. private Boolean voiceEnabled;
  12. public AmiVoice(Boolean voiceEnabled) {
  13. this.voiceEnabled = voiceEnabled;
  14. }
  15. public void speak(String textToBeSpoken){
  16. if(voiceEnabled){
  17. Thread thread = new SpeechThread(textToBeSpoken);
  18. thread.start();
  19. }
  20. }
  21. }