Issue when i'm running my own french model (SOLVED)

hello,

I just try to train my own model based on the french common voice corpus. No problem on this side for the moment

I trained the moment on a machine with GPU. As I have a problem of CUDA dependencies when i try to run my model, i build a second VM just for execution the model without contraint

On this second machine, i think all is ok because when i try to execute the english pre-trained model, i have no problem. When i do the same thing with my own model, i have a basic error. I do really not understand where it came from.

is there somebody who can help me investigating this issue. Thx

One more thing. I train my model with tensorflow 1.13.1 and deepspeech 0.4.1 as explain on deepspeech github. however the deepseech runtime i install via pip is based on TensorFlow v1.12.0-10-ge232881, DeepSpeech: v0.4.1-0-g0e40db6.

Do you think it can be a problem. Perhaps i need to build my own native client based on tensorflow 1.13 ?

Thanks in advance for your advice.

(deepspeech-venv) [layer@deepspeech ~]$ deepspeech --model modelsfr/speech2text_fr_v1.pbmm --alphabet modelsfr/alphabet.txt --audio modelsfr/test_audio.wav
Loading model from file modelsfr/speech2text_fr_v1.pbmm
TensorFlow: v1.12.0-10-ge232881
DeepSpeech: v0.4.1-0-g0e40db6
2019-04-25 11:13:39.159754: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Not found: Op type not registered ‘AudioSpectrogram’ in binary running on deepspeech. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
Traceback (most recent call last):
File “/home/layer/deepspeech-venv/bin/deepspeech”, line 11, in
sys.exit(main())
File “/home/layer/deepspeech-venv/lib64/python3.6/site-packages/deepspeech/client.py”, line 80, in main
ds = Model(args.model, N_FEATURES, N_CONTEXT, args.alphabet, BEAM_WIDTH)
File “/home/layer/deepspeech-venv/lib64/python3.6/site-packages/deepspeech/init.py”, line 14, in init
raise RuntimeError(“CreateModel failed with error code {}”.format(status))
RuntimeError: CreateModel failed with error code 5

I solve my problem. I download the native 0.5 alpha 6 client. And it works. But there is some warning. As the inference output is empty, i don’t know if it’s due to model training or alpha version of deepspeech. So i decide to re-train my model with 0.4.1 version.

Could you join efforts ? https://github.com/Common-Voice/commonvoice-fr

possible, what kind of help to you need ?

All help is welcome, I’ll read your message after

It’s likely because of training, not enough epochs. Can you share your training parameters?

if you train with current master your model will not be compatible with the binaries of version 0.4.1

As i’m a beginner, i try with something simple. If you can help me to determinate what can be a first set of parameters to start, it will be cool :slight_smile:

python -u DeepSpeech.py \
–train_files /mnt/disks/ssd/common-voice-fr/clips/train.csv \
–dev_files /mnt/disks/ssd/common-voice-fr/clips/dev.csv \
–test_files /mnt/disks/ssd/common-voice-fr/clips/test.csv \
–alphabet_config_path /mnt/disks/ssd/common-voice-fr/alphabet.txt \
–epochs 7
–checkpoint_dir /mnt/disks/ssd/checkpoints/ \
–export_dir /mnt/disks/ssd/model_export/

Maybe you can try to get inspired from https://github.com/lissyx/DeepSpeech/blob/master/bin/train_fr.sh

it’d be great we move on https://github.com/Common-Voice/commonvoice-fr/issues/24 and associated common voice import / cleanup tooling to avoid re-inventing the wheel everytime.

If you want to work on this docker pipeline feel free

7 epochs is likely not enough
How did you generate your alphabet ?
You would also be using english language model since you don’t specify one

All that feels consistent with “empty” output.

I built the alphabet using the command check_characters.py

Actually, i’m looking how to build a french language model. But I can use the English one if it does not interfere with learning

I will try the parameters you propose here https://github.com/lissyx/DeepSpeech/blob/master/bin/train_fr.sh

Thanks