PageRenderTime 110ms CodeModel.GetById 92ms app.highlight 1ms RepoModel.GetById 17ms app.codeStats 0ms

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