Kaldi_NL on Ponyland Howto¶
This is a short Howto for using Kaldi_NL on Ponyland to decode Dutch speech.
Using containers¶
If you're planning on just using Kaldi_NL to decode dutch speech, and not to do any development on the internals of the system. Then just use the OCI container provided by Kaldi_NL, make sure you have apptainer setup and then run (adapt to your own needs):
$ apptainer run --bind /vol/tensusers/proycon:/data --pwd /opt/Kaldi_NL docker://proycon/kaldi_nl ./decode_OH.sh /data/proytest.wav /data/
Pass your own data location with the --bind
parameter (will be mounted
inside the container as /data
), and ensure you use absolute paths in
/data
to specify the input file and output location (last two
arguments).
If you need only the kaldi base system and none of the extra dutch models or
convenience scripts provide, then you can use the proycon/kaldi
image instead
Shared public installation¶
There is a shared public kaldi installation in /vol/customopt/kaldi
, you can
set that as your $KALDI_ROOT
. It includes Kaldi_NL in
/vol/customopt/kaldi/Kaldi_NL
, and its models in /vol/customopt/kaldi/Kaldi_NL/models
.
Note: This is public and shared, you can not edit this installation!
Private development installation¶
If you do intend to do development on Kaldi, then having to rebuild containers after every change is prohibitively expensive, and the shared public installation is not suitable because you can't write there.
We therefore provide an installation script that will install both Kaldi and Kaldi_NL on ponyland in a directory of your choice, after which you can freely edit either.
$ git clone https://github.com/proycon/kaldi-installer
$ cd kaldi-installer
$ ./install.sh -p /your/destination/directory
The destination directory will be your KALDI_ROOT
, Kaldi_NL
will be in a
subdirectory under it. See ./install.sh -h
for further installation
parameters.
Note: Kaldi used to be shipped as part of LaMachine. This environment, however, is now deprecated and not recommended anymore!. The solution laid out in this subsection replaces it.
Note: These installations are for development only, they can NOT be used for offering webservices! Our service deployments always run in containers.
Using and contributing to Kaldi_NL¶
The Kaldi NL repository can be found at:
https://github.com/opensource-spraakherkenning-nl/Kaldi_NL
This link is also where you can read some general documentation and instructions on how to contribute, so make sure to read it. On this wiki page we will merely suggest a workflow for using this on ponyland.
If you intend to develop your own system and contribute to Kaldi_NL, then it is recommended to fork this project and base your work on that. You can later send a pull request to contribute your changes back and make them available for the wider research community. Please read the contributor guidelines.
Note: if you're going to want to distribute your models or offer a webservice using them, then going through Kaldi_NL is the only supported way, because it is our solution to problems like model downloading, containerisation and prevent code duplication.
Starting a new Kaldi_NL project from scratch¶
If you used the installer, models are in a subdirectory in $KALDI_ROOT/Kaldi_NL/models/
.
Run configure.sh¶
From inside your copy of Kaldi_NL run:
./configure.sh
This will generate a new decode.sh
script.
Make input and output directories¶
E.g.
mkdir input output
Copy data to the input directory¶
E.g.
cp ~/example.wav input/
Run decode.sh¶
./decode.sh input/ output/