protected override Completion ExecuteImpl(ExecutionEnvironment enviroment) { if (!string.IsNullOrEmpty(Name)) { SpeachBase.GetSpeech(enviroment).SelectVoice(Name); } return(Completion.Void); }
public Completion Assign(ExecutionEnvironment environment, object value) { if (!TypeConverters.IsNumber(value)) { return(Completion.Exception(Properties.Language.NotNumber, this)); } int v = (int)value; if (v < -10 || v > 10) { return(Completion.Exception(Properties.Language.RateOutOfRange, this)); } SpeachBase.GetSpeech(environment).Rate = v; return(new Completion(v)); }
protected override Completion ExecuteImpl(ExecutionEnvironment enviroment) { if (Text == null) { return(Completion.Void); } var c = Text.Execute(enviroment); if (!c.IsValue) { return(c); } string t = c.ReturnValue + ""; SpeachBase.GetSpeech(enviroment).Speak(t); return(Completion.Void); }
protected override Completion ExecuteImpl(ExecutionEnvironment enviroment) { return(new Completion(SpeachBase.GetSpeech(enviroment).Rate)); }