Problem running generate_scorer_package.cpp

Hi I am using latest code for creating my own scorer, generate_lm.py script ran successfully and created vocab file and lm.binary too . My problem is since generate_pacakge.py has been rewritten to generate_scorer_package.cpp, how can make use of it to package and create the .scorer file?

I tried using g++ make it executable and pass the arguments.
But it is giving me error , No such file or directory #include "absl/types/optional.h"

Is the correct way to generate scorer package?

Thanks in advance!

Don’t use latest codebase, that’s what releases are for. Stick to 0.7.4 or you might run into problems.

Use the one shipped in native_client.tar.xz

Just follow the docs on how to build it, obviously you are not doing it right, so just use the prebuilt one mentionned earlier.

Okay got you @othiele . Thank you !
But if at all I have to use the generate_scorer_package.cpp file to package the scorer , could you please point me to some documentation related to that?

Just follow the build instructions and use //native_client:generate_scorer_package instead of //native_client:libdeepspeech.so

I might have overlooked that, after checking we don’t have doc yet: Document how to build generate_scorer_package · Issue #3182 · mozilla/DeepSpeech · GitHub

Thank you for the confirmation @lissyx . For the time being I will use the release 0.7.4 generate_package.py .

When cloning the release codebase, what specifically do I git clone?

The documentation at https://deepspeech.readthedocs.io/en/v0.7.4/TRAINING.html just says to git clone https://github.com/mozilla/DeepSpeech. Won’t this pull the entire codebase?

What tags do we specify when cloning to get release 0.7.4 code only?

Something like git checkout v0.7.4 ?

@Epoetin , yes you are right , do git clone first and then do

git checkout tags/<tag_name>
1 Like

I usually do sth like this

git clone --branch v0.7.4 …

Don’t user the master branch as it is in active development.

2 Likes