Search code examples
terminalubuntu-18.04julius-speech

Errors running julius.jconf in Ubuntu 18.04 command line


I have installed julius according to the Quick Run instructions on their git repo, but am getting mixed results that never run. However, when running the Quickstart suggested in this thread I have been able to get the program running.

Using the command meant to recognize an audio file included with the "official" julius demo, ../julius/julius/julius -C mic.jconf -dnnconf dnn.jconf -input mic, I get the following errors:

STAT: include config: julius.jconf
Stat: para: parsing HTK Config file: wav_config
Warning: para: "SOURCEFORMAT" ignored (not supported, or irrelevant)
Warning: para: TARGETKIND skipped (will be determined by AM header)
Stat: para: TARGETRATE=100000.0
Warning: para: "SAVECOMPRESSED" ignored (not supported, or irrelevant)
Warning: para: "SAVEWITHCRC" ignored (not supported, or irrelevant)
Stat: para: WINDOWSIZE=250000.0
Stat: para: USEHAMMING=T
Stat: para: PREEMCOEF=0.97
Stat: para: NUMCHANS=26
Stat: para: CEPLIFTER=22
Warning: para: NUMCEPS skipped (will be determined by AM header)
Warning: no SOURCERATE found
Warning: assume source waveform sample rate to 625 (16kHz)
ERROR: m_options: wrong argument: "-dnnconf"
Try `-help' for more information.

The Quickstart runs on the mic using julius -input mic -C dnn.jconf, I have modified it to julius -input mozilla.wav -C dnn.jconf in the directory created for the julius demo, but get the error message Segmentation fault (core dumped).

It's clear that there is no problem receiving audio from the mic, but I am not sure where I'm going wrong on the julius-speech quick run. Any suggestions would be much appreciated!


Solution

  • The problem was my lack of understanding in how to modify the dnn.jconf file. As of 4.5 the dnn.jconf should read:

    feature_type MFCC_E_D_A_Z
    feature_options -htkconf wav_config -cvn -cmnload ENVR-v5.3.norm -cvnstatic
    num_threads 1
    feature_len 48
    context_len 11
    input_nodes 528
    output_nodes 7461
    hidden_nodes 1536
    hidden_layers 5
    W1 ENVR-v5.3.layer2_weight.npy
    W2 ENVR-v5.3.layer3_weight.npy
    W3 ENVR-v5.3.layer4_weight.npy
    W4 ENVR-v5.3.layer5_weight.npy
    W5 ENVR-v5.3.layer6_weight.npy
    B1 ENVR-v5.3.layer2_bias.npy
    B2 ENVR-v5.3.layer3_bias.npy
    B3 ENVR-v5.3.layer4_bias.npy
    B4 ENVR-v5.3.layer5_bias.npy
    B5 ENVR-v5.3.layer6_bias.npy
    output_W ENVR-v5.3.layerout_weight.npy
    output_B ENVR-v5.3.layerout_bias.npy
    state_prior_factor 1.0
    state_prior ENVR-v5.3.prior
    state_prior_log10nize false
    

    Then it will work exactly as the Quickstart lays out. See this closed issue from the julius repo.