deepspeech-rs icon indicating copy to clipboard operation
deepspeech-rs copied to clipboard

Quickstart guide and steps on Linux

Open eliaspekkala opened this issue 4 years ago • 2 comments

I had trouble understanding the Quickstart guide in the README, but eventually got it working.

Maybe we could update the Quickstart guide to show the exact steps (to try it) on each platform?

In case it helps someone, here is what I did to try deepspeech-rs on Linux (Manjaro):

  1. git clone [email protected]:RustAudio/deepspeech-rs.git

  2. cd deepspeech-rs

  3. wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.pbmm

  4. mkdir models

  5. mv deepspeech-0.9.3-models.pbmm ./models

  6. wget https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/native_client.amd64.cpu.linux.tar.xz

  7. mkdir native_client

  8. tar xf native_client.amd64.cpu.linux.tar.xz --directory=./native_client

  9. export LD_LIBRARY_PATH=./native_client

  10. export LIBRARY_PATH=./native_client

  11. arecord -f cd -c 1 test.wav

  12. Say "one two three" and then press Ctrl-c

  13. cargo run --release --example client ./models ./test.wav

  14. Look at the output, which should be "one two three"

  15. All done! To try other words/sentences, do steps 11 to 13

eliaspekkala avatar May 22 '21 19:05 eliaspekkala

Big thanks to you. I also had issues understanding the Readme and errors oncurred. After following your introduction all was clear and I can customize my "workflow". Are you able to make a PR?

fossdd avatar Jun 08 '21 17:06 fossdd

I'm glad that it helped you get started. :smiley:

I previously suggested that we could add these steps to the Quickstart, but now I've come to think that these steps should be automatic so that users of this library can do cargo build and cargo run, and it will "just work".

One could try implementing this automation using build.rs or shell scripts. The issue is that Mozilla Deepspeech and Tensorflow are difficult to compile (in my experience).

My exploration into automating these steps ended when I didn't manage to compile Mozilla Deepspeech and Tensorflow on my platform. Anyone who wants, feel free to investigate this further.

eliaspekkala avatar Jun 10 '21 20:06 eliaspekkala