Skip to content

priyanshu-baran/Voice_Assistant_Using_Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Voice Assistant (named JARVIS 😜) Using Java


Introduction (❁´◑`❁):

This project is basically made by me in order to step in the world of AI (Artificial Intelligence) with Java. I have used two main components, or you can say Libraries for it. The first one is FreeTTS, this is for converting text-to-speech and the second one is Sphinx4, used for converting speech-to-text.

Using FreeTTS is somewhat easy, you just need to set the voice (this library comes with some inbuilt voices, you can use one of them or use another famous library specifically for choosing voices of your own choice, i.e. MBROLA) and that's it. Now give some command for it to speak and there you go... 😍. Need help? Just once check the sample TTS.java file for this.

But when it comes to speech-to-text, you need to prepare some stuffs beforehand (as discussed in the installation section). For sample once have a look at STT.java file.


βœ… Steps to start with:

  1. Firstly clone this project and open it in any of your favourite IDE (mine is IntellIJ 😊).
  2. Add all the jar files (basically the dependencies of this project) present in the library folder into your project folder from the IDE itself.
  3. Now create a command.txt file and add all the commands which you want Jarvis to listen and respond accordingly.

Remember: In this file, whatever commands you enter, only those words will be recognized, regardless of what you speak.

  1. Now go to this site. And upload the command.txt file on the space given in it and then click Compile Knowledge Base button.
  2. You will get redirected to next page from where you need to download two files, one is of .dic extension (called dictionary file) and other is .lm (called language model file) and save it in your project folder.

Note: You can use mine too. As I already did all the steps required for some commonly used commands.

  1. In order to confirm that your whole setup is working fine or not, run that two sample files TTS.java and STT.java. If they both runs smoothly then you are ready to move on to the next step πŸ₯³πŸŽ‰ else re-config your setup and try again πŸ€•πŸ«£.

Make sure to enable the mic permissions for your IDE (I did not do this and have changed almost half of my code πŸ˜…. So make sure you don't do this mistake).

  1. And that's it. Now you can run the VoiceAssistant.java file and there you have it, your own personal voice assistant named JARVIS πŸŽ™οΈ for your own convenience, and now you are ready to jump into action.

Contributing πŸ“

If you would like to contribute to this repo Voice_Assistant_Using_Java, please fork the repository and submit a pull request with your changes. Contributions are welcome and encouraged!


Known issues (Work in progress... πŸ‘·πŸ½β€β™‚οΈβš’οΈ)

This project is still ongoing. I am working on converting this whole thing in a GUI for better user experience along with few more commandsβœοΈπŸ“. So till then do whatever you like and wait for it as it will be soon get uploaded hereπŸ‘.


Like this project? 🀩

If you are feeling generous, buy me a coffee...!!! β˜•

Buy Me A Coffee


Happy Coding...!! πŸ‘¨πŸ½β€πŸ’»πŸ‘¨πŸ½β€πŸ’»

About

Tried to make JARVIS (Voice Assistant) using Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages