But, still, an exciting project. I would love to rid my house of Google Home devices which are training my kids to think Google is god.
But, still, an exciting project. I would love to rid my house of Google Home devices which are training my kids to think Google is god.
My parents would simply scream with a loud bang from a foot stomp or fist slam "Enough!" OR "shut up, the both of you!" which worked very well. Did not require purchasing anything, accounts or internet connection.
I feel like the meme that Java is slow and bloated needs to die. Java can be very fast, and also runs on fricking SIM cards that have extremely limited processor and memory.
Granted, often enough Java is fine, it doesn't use too much overhead, especially once the JVM is warmed up. But the bloat is real and it's partially related to the language itself but plenty of it is also systemic.
A lot of deployed deep learning is in Python so I doubt this will matter. Looking at the docs, it looks like the main speech to text is python heavy, it leverages elasticsearch and calls libraries that are bindings to code written in C++. As none of that overhead will ultimately matter for anything approaching the fidelity you get with cloud services, cost benefit trade off favors Java in this scenario.
> lower profile computers
When it comes to deep learning, this just isn't the direction things are headed. If you want the best results with low latency, your home server is going to have to be fairly beefy with a decent GPU and lots of memory.
> When it comes to deep learning, this just isn't the direction things are headed.
You're not going to be training the models on the raspberry pi, just running them. There's a huge difference in requirements there, and lots of progress has been made towards squeezing models into phones etc. ( https://pytorch.org/mobile/home/ ). There are also efforts like like https://github.com/XapaJIaMnu/translateLocally , https://neural.mt/speed/2021/
As someone who never uses Java _and_ still dislikes it, it's because i've had to install that damn runtime a thousand times. At least Python has the simplicity in coming pre-installed on many systems. I can't count the number of times i've installed/uninstalled Java.
Also, back in the day i was used to seeing some Java systray icon. I imagine that built some dislike towards Java too.
At any rate, Java isn't a client language. It's very much geared toward server development. It's not impossible to write client software with it (see Minecraft), but it's really clunky and not really suitable. They've basically done everything they can to make it as awful as possible to use for desktop users, basically ceding the ground to C# almost more through self-sabotage than losing a fight.
I don't want to be conspiratorial, but it can be suspected Microsoft and Oracle had lunch together and came to some sort of an agreement.
Think of it in terms of human languages.
C and C++ (and many - but not all - compiled languages) get compiled into Native program, so they get compiled into instructions that talk the computer's language, and when they get run they talk directly to your computer... albeit with a thick accent. So a linux machine can only talk to your machine via the linux kernel, a windows machine talks with a windows accent, macs... you get the idea.
Because of this thick accent, programs cannot be shared between different operating systems (though there are some amazing projects out there that either do some accent translation, or more recently, do clever things to avoid any accent at all. There are almost always limitations to what can be done here though.)
That's not to say that sometimes, they don't need help. These "helpers" (or Shared Libraries - aka DLLs or .so files) might be absolutely necessary for a certain program to run, because the developers don't want to reinvent the wheel. So as someone else pointed out, even with native programs you sometimes need to download extra bits to get them running. But as you've noted, this is a lot more rare, and it doesn't usually change HOW you run the program, merely what needs to be installed first.
PHP, Ruby, Bash etc are Interpreted - so they need a special program that does the talking to the machine (again, via the kernel). This means they don't need to be compiled, which makes them quicker for developers to write, and easier to run on windows / linux / mac using the same codebase. But like with a human interpreter, it generally takes at least 2x as much energy to get the message across, which usually means a sometimes significant slowdown.
Note that this is not the same as having a Shared Library - and in fact these programs sometimes do use Shared Libraries directly. With interpreted languages, the interpreter starts first, it gathers together some core resources and ideas that it will need to be able to do its interpretation, and then it will load the human-readable program. Some shared libraries will be loaded by the interpreter, and some will be loaded later once the interpreter has seen the code.
Java is in a special category. It is both interpreted and compiled - that is to say, it compiles to something that looks a bit like a native program, but it still has this interpretive layer that gathers together core resources and ideas that the compiled program can then use - we call this part of the interpreter a VM, or Virtual Machine. It then loads a program that is very much not human-readable into that VM, which then does all the translating.
The theory is, Java could be the best of both worlds. It can have speed closer to a compiled language (and in fact, can sometimes be a little faster in places, as the VM contains some nifty tricks to move things around on certain machines) and yet the compiled languages can be run on any machine that has the Java Runtime installed (I believe they coined the phrase "Write once, run everywhere" which very soon got corrupted to "Write once, test everywhere" because the first few versions of the Java VM were spectacularly buggy)
As for that dislike of Java, I will point out that I spent 5 years writing Java programs. Once I was no longer forced to write Java programs, I stopped, and haven't touched it for at least 10 years. Because while Java could be the best of both worlds, it wasn't then. And it might be much better now... maybe. I cannot forgive it for the years of my life that it stole; and am now very happy in the arms of pretty much any other language.
That's not even getting into the Java ecosystem which is vast, but it's full of nightmares like remote debugging ports that allow unauthenticated remote access to the JVM's memory space.