info_command.cs 1.0 KB

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.Specialized;
  4. using System.Text;
  5. using System.ConsoleApp;
  6. using System.ConsoleApp.Commands;
  7. namespace Speech.Commands {
  8. [ConsoleCommand("info")]
  9. class info_command : BaseCommand {
  10. public static bool execute(string line, string cmd, NameValueCollection arguments) {
  11. WriteLine(new NameValueCollection() {
  12. {"Port", Program.api.Port.ToString() },
  13. {"Running", Program.api.Running?"True":"False" },
  14. {"Text2Speech", SpeechExecute.SpeechSystem.GetName() },
  15. {"Play", SpeechExecute.PlaySystem.GetName() },
  16. {"Is Playing", SpeechExecute.isPlaying?"True":"False" },
  17. {"Is Generating", SpeechExecute.isGenerating?"True":"False" },
  18. {"Cached Items", SpeechExecute.Cache.Count.ToString() },
  19. {"Cached Direcotry", SpeechExecute.Cache.Directory.Replace("\\","/") }
  20. }, false);
  21. return false;
  22. }
  23. }
  24. }