5 ms·
So, I'm not sure I get the "embarrassingly simple" part. As in here is a file some_txt.txt, how do I convert it to a .wav ? As in: what do I type in my shell
by ur-whale 4y ago
So, I'm not sure I get the "embarrassingly simple" part.
As in here is a file some_txt.txt, how do I convert it to a .wav ?
As in: what do I type in my shell to convert some_txt.txt to some_txt.wav
That would be something that would deserve the moniker "embarrassingly simple" in my book.
- spupe 4y agoTheir Colab examples work pretty much like that.
- ducktective 4y agoColab is running software on other people's computer. The moment you try to reproduce in local env, you'll be greeted with many "non-existent and unmatched dependency" errors. Also, "examples" do not cut it.
- snakers41 4y agoI am not sure, what can be more simple than 1 LOC invocation + minimal imports. It is true that the model is based on PyTorch + python, but the majority of complexity (like SSML parsing) is tucked inside of the model. Theoretically one can make a simplified model without any of those features in plain PyTorch or ONNX, but so far we did not have proper motivation to do. As for CLI, this also seems simple enough, but out of scope for us.
- ur-whale 4y ago> I am not sure, what can be more simple than 1 LOC invocation + minimal imports. Let me make it "embarrassingly simple" for you: /bin/bash text_to_speech.sh file.txt file.wav Also, I'm not entirely sure what "out of scope" mean? Do you mean you run your software on computers that can't run bash? Do you develop machine learning algorithms on your phone?
- snakers41 4y ago> Do you mean you run your software on computers that can't run bash? It is explicitly stated, that PyTorch is the only real requirement. Bash is not required, i.e. models can be run on Windows or ARM with PyTorch. > Also, I'm not entirely sure what "out of scope" mean? There was no tangible benefit in making a bash CLI for us.
- zelphirkalt 4y agoIn such situations it could be useful to provide a container image or nix or guix shell setup, to make sure people have the dependencies they need.
- spupe 4y agoFrom my experience with similar projects, it doesn't get any simpler than creating a virtual environment, running requirements.txt and using a simple function to get what you want. Did you have a problem when you tried running that? Colab in this case is just abstracting that part for the user.
- techdragon 4y agoNot criticising this project in particular but I frequently find that Colab is just a way for people to get/be very very bad at managing build/deployment of their code. It allows hand rolling a bunch of adjustments to an environment that may only be barely understood and then simply cloning that poorly understood environment. 3/4 times I try to make/rebuild a Colab based demo from scratch in a suitable non Colab environment… the setup instructions are caring degrees of wrong. From the little mistakes like under specific requirements that are now broken due to transient dependency changes, to completely wrong because everything has changed to the absolute worst version of all, the never even written down. I find Colab is a subtle form of lock in by providing useful crutches … by leaning on the crutches of Colab handing all this hard dependency and environment management stuff you never need to learn how to do it any better than necessary to function on Colab… to draw a somewhat nasty analogy using terminology from the DevOps world, good dependency and build tools make a folder full of code like cattle, you can blow it away and rebuild it when you want, but Colab let’s you raise a pet by hand and then just magically clones it whenever you or someone else need a copy.
- ur-whale 4y agoYes, that has been my exact experience with folks who work within Colab and other Jupyter-like things: 1. They assume everyone has access to the same environment they do 2. They often don't understand anything about the infrastructure that's running their stuff 3. They produce very interesting work (such as this particular TTS work) 4. They drop 90% of their potential audience within 5 mn because the bloody thing lives in a weird cloud-only environment or requires a nightmarish stack of dependencies to run on a local machine and basically can't be simply integrated in a larger pipeline (e.g. a simple shell script). My experience has been that getting ML researchers to get their head out of colab's ass and learn to type things like "ls" and "cd" is really hard.
- ducktective 4y agoExactly! Why so many ML tools don't provide a static single-binary CLI? "That", is embarrassingly simple.
- robonerd 4y agoIt's hard not to see it as researchers doing typical ivory tower gatekeeping. If it were only a few of them that neglected to provide simple tools and installation instructions for common people, I would chalk it up to laziness. But this is the standard way with TTS projects, every time it takes me ten minutes of head scratching until I get the thing to work. It's been this way for years. To make it twice as frustrating, these new systems never seem to trickle down to FOSS software users; they get incorporated into commercial products but the average linux desktop user with vision problems is still left suffering with Festival. Any such user who wants to use these new models is left to figure out how to integrate these systems themselves. Anyway, I do appreciate them publishing this. I got it working now and it will suit my needs well; it's the best CPU-based TTS that I've managed to get running thus-far, and I think the quality will be good enough for narrating ebooks. Good enough for now, I'll figure out how to get Firefox using this later.
- grumbel 4y ago> what do I type in my shell to convert some_txt.txt to some_txt.wav Doesn't look like they have any command line tool included, but they have a simple Python example in the README. I used that, added some argparse around it and build a Nix package out of it. In case you are running Nix with flakes enabled, you can just type: nix run github:grumbel/silero-test -- -t "Hello World" --speaker en_0 -o /tmp/out.wav Source is pretty much "embarrassingly simple": https://github.com/Grumbel/silero-test/blob/master/silero-test It's currently hard codes the English language model, other models can be found at https://models.silero.ai/models/tts/ https://models.silero.ai/models/tts/ PS: This is probably reinventing the wheel, haven't looked around if there is anything ready to use already.
- ur-whale 4y agoSuper, this is very useful, thank you!