aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ExportBot/Commands/Communication/TtsCommand.cs
diff options
context:
space:
mode:
authorgareth2007-05-08 09:56:20 +0000
committergareth2007-05-08 09:56:20 +0000
commitcbf492109ccda213971c09d1048e9d26d09d9b37 (patch)
treec8ab5c60740acf20033c9241410a94854513d029 /ExportBot/Commands/Communication/TtsCommand.cs
parentRemoved libsl nant build file (diff)
downloadopensim-SC-cbf492109ccda213971c09d1048e9d26d09d9b37.zip
opensim-SC-cbf492109ccda213971c09d1048e9d26d09d9b37.tar.gz
opensim-SC-cbf492109ccda213971c09d1048e9d26d09d9b37.tar.bz2
opensim-SC-cbf492109ccda213971c09d1048e9d26d09d9b37.tar.xz
Fixed nant build files
Added ExportBot code (ZOMG! IMPORTED THE EXPORT BOT!) Fixed ExportBot's build
Diffstat (limited to 'ExportBot/Commands/Communication/TtsCommand.cs')
-rw-r--r--ExportBot/Commands/Communication/TtsCommand.cs51
1 files changed, 0 insertions, 51 deletions
diff --git a/ExportBot/Commands/Communication/TtsCommand.cs b/ExportBot/Commands/Communication/TtsCommand.cs
deleted file mode 100644
index e8bd122..0000000
--- a/ExportBot/Commands/Communication/TtsCommand.cs
+++ /dev/null
@@ -1,51 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Speech.Synthesis;
5using libsecondlife;
6using libsecondlife.Packets;
7using libsecondlife.AssetSystem;
8
9
10// Since this requires .Net 3.0 I've left it out of the project by default.
11// To use this: include it in the project and add a reference to the System.Speech.dll
12
13namespace libsecondlife.TestClient
14{
15 public class TtsCommand : Command
16 {
17 SpeechSynthesizer _speechSynthesizer;
18
19 public TtsCommand(TestClient testClient)
20 {
21 Name = "tts";
22 Description = "Text To Speech. When activated, client will echo all recieved chat messages out thru the computer's speakers.";
23 }
24
25 public override string Execute(string[] args, LLUUID fromAgentID)
26 {
27 if (!Active)
28 {
29 if (_speechSynthesizer == null)
30 _speechSynthesizer = new SpeechSynthesizer();
31 Active = true;
32 Client.Self.OnChat += new MainAvatar.ChatCallback(Self_OnChat);
33 return "TTS is now on.";
34 }
35 else
36 {
37 Active = false;
38 Client.Self.OnChat -= new MainAvatar.ChatCallback(Self_OnChat);
39 return "TTS is now off.";
40 }
41 }
42
43 void Self_OnChat(string message, byte audible, byte type, byte sourcetype, string fromName, LLUUID id, LLUUID ownerid, LLVector3 position)
44 {
45 if (message.Length > 0)
46 {
47 _speechSynthesizer.SpeakAsync(message);
48 }
49 }
50 }
51} \ No newline at end of file