Skip to content
This repository was archived by the owner on Jul 5, 2018. It is now read-only.

Conversation

@roccodev
Copy link

--IMPORTANT--
How to use Speech Synthesiser:

  1. Import com.darkprograms.speech.HelloWorld
  2. Use HelloWorld.talk(String yourtext);
  3. If you want edit the HelloWorld.java file to use your language (e.g. change en-us to it-IT)
  4. Download JMF MP3 Plugin from here: - mp3plugin.jar
  5. Ready to go!

@roccodev
Copy link
Author

You should also download (or clone from GitHub) J.A.R.V.IS from here https://github.com/lkuza2/java-speech-api

@devloop0
Copy link
Collaborator

After a cursory glance at your code, I have a couple of thoughts:

  1. https://github.com/the-machine-project/the-machine/pull/39/files#diff-9447d019d578e3b47be729cf5f555f6cR30 and https://github.com/the-machine-project/the-machine/pull/39/files#diff-9447d019d578e3b47be729cf5f555f6cR25, please actually return something. I'm not 100% sure what happens if you return null, but you should at least definitely return some helpful information like all the other commands to for help. For the actual command itself, at least return an empty ArrayList<ArrayList>() (This is the output of the command, each arraylist contains what a line of output should contain).
  2. Why did you decide to add a separate shell for your questions and answers UI? You seem to have copied a lot of the code that I wrote and modified it slightly from the machine terminal. If I decided to change anything in the Terminal.java file, either you would have to change it in the QUIShell.java file or allow the two to diverge. Look at your handledEnteredCommand, there doesn't seem to be special about the commands that you added that warrants another shell.
    I designed the Command API to be extremely developer-friendly to add commands, if you want me to explain how to use it, I certainly will, just let me know. The new commands you seemed to have added were "HI", "THREAT WHO"/"WHO THREAT", "TIME", "SSN", and "PROFILE". Your "PROFILE" command copies a lot of functionality from the "lsuser" command that already exists. Perhaps you could modify that with some command line switches? Also, commands generally tend to be lower-case letters (I tried to model it after UNIX bash shell commands).
    I think you should just create separate commands for all of these instead of an entirely different shell. Let me know if you need help doing that, or if I have misinterpreted what you are trying to do. Also, let me know if you want to customize output so that you can display everything in the terminal as well, it is extremely easy to do, but you just have to know how to do it.

@roccodev
Copy link
Author

Look more at the code.
Those are only keywords. So both "Gimme the profile of John" and "profile of John" are accepted.
I put that in upper-case because I created the contains() static method. Basically, it transforms the user input to upper case and then checks if the keywords match. Of course you can change it to lower case.

@devloop0
Copy link
Collaborator

Okay, even if everything is lowercase, I still think that everything you wrote should not be in a separate shell. There should only be one shell for the machine. Try writing new commands for the current terminal that have the functionality of everything you currently have. I saw that for some of your commands, you accept keywords, regardless of order. The problem is that the terminal looks at the first string in the space separate array as a command and later dispatches everything. This might be why you created a separate shell, but as I said before, just try writing new commands for the machine. None of your current commands need a copy of the existing shell code as a separate source file (QUIShell.java) in order to function correctly. If everyone created their own pop-up windows for the commands they supported, then every command not written by me would open new windows.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants