JULIUS(1)
julius π β¨
okay bestie, this is the JULIUS(1) manual page and I am so normal about it. it's giving open source multi-purpose LVCSR engine energy, no cap. we're gonna read it together like a group chat at 2am. π
πΈ NAME πΈ
julius β open source multi-purpose LVCSR engine π¦
β¨ SYNOPSIS β¨
julius [-C jconffile] [options...]
π DESCRIPTION π
so like, julius is a high-performance, multi-purpose, open-source speech recognition engine for researchers and developers. it is capable of performing almost real-time recognition of continuous speech with over 60k-word 3-gram language model and triphone HMM model, on most current PCs. julius can perform recognition on audio files, live microphone input, network input and feature parameter files. literally versatile queen behavior. π
the core recognition module is implemented as a C library called "JuliusLib". it can also be extended by plug-in facility. obsessed.
π§ Supported Models
julius needs a language model and an acoustic model to run as a speech recognizer. julius supports the following models. periodt.
Acoustic model
Sub-word HMM (Hidden Markov Model) in HTK ascii format are supported. Phoneme models (monophone), context dependent phoneme models (triphone), tied-mixture and phonetic tied-mixture models of any unit can be used. When using context dependent models, inter-word context dependency is also handled. Multi-stream feature and MSD-HMM is also supported. You can further use a tool mkbinhmm to convert the ascii HMM file to a compact binary format for faster loading.
Note that julius itself can only extract MFCC features from speech data. If you use acoustic HMM trained for other feature, you should give the input in HTK parameter file of the same feature type. don't skip this part bestie, it's important. π
Language model: word N-gram
Word N-gram language model, up to 10-gram, is supported. Julius uses different N-gram for each pass: left-to-right 2-gram on 1st pass, and right-to-left N-gram on 2nd pass. It is recommended to use both LR 2-gram and RL N-gram for Julius. However, you can use only single LR N-gram or RL N-gram. In such case, approximated LR 2-gram computed from the given N-gram will be applied at the first pass.
The Standard ARPA format is supported. In addition, a binary format is also supported for efficiency. The tool mkbingram(1) can convert ARPA format N-gram to binary format. slay. π
Language model: grammar
The grammar format is an original one, and tools to create a recognition grammar are included in the distribution. A grammar consists of two files: one is a 'grammar' file that describes sentence structures in a BNF style, using word 'category' name as terminate symbols. Another is a 'voca' file that defines words with its pronunciations (i.e. phoneme sequences) for each category. They should be converted by mkdfa(1) to a deterministic finite automaton file (.dfa) and a dictionary file (.dict), respectively. You can also use multiple grammars.
Language model: isolated word
You can perform isolated word recognition using only word dictionary. With this model type, Julius will perform rapid one pass recognition with static context handling. Silence models will be added at both head and tail of each word. You can also use multiple dictionaries in a process. main character energy fr fr.
π§ Search Algorithm
Recognition algorithm of julius is based on a two-pass strategy. Word 2-gram and reverse word 3-gram is used on the respective passes. The entire input is processed on the first pass, and again the final searching process is performed again for the input, using the result of the first pass to narrow the search space. Specifically, the recognition algorithm is based on a tree-trellis heuristic search combined with left-to-right frame-synchronous beam search and right-to-left stack decoding search.
When using context dependent phones (triphones), interword contexts are taken into consideration. For tied-mixture and phonetic tied-mixture models, high-speed acoustic likelihood calculation is possible using gaussian pruning.
For more details, see the related documents. iykyk. π
π₯ OPTIONS π₯
These options specify the models, system behaviors and various search parameters to Julius. These option can be set at the command line, but it is recommended that you write them in a text file as a "jconf file", and specify it by -C option. bestie, please use the jconf file, it's the vibe. π«Ά
Applications incorporating JuliusLib also use these options to set the parameters of core recognition engine. For example, a jconf file can be loaded to the engine by calling j_config_load_file_new() with the jconf file name as argument.
Please note that relative paths in a jconf file should be relative to the jconf file itself, not the current working directory. okay this is lowkey a gotcha, remember it. π
Below are the details of all options, gathered by group.
π» Julius application option
These are application options of Julius, outside of JuliusLib. It contains parameters and switches for result output, character set conversion, log level, and module mode options. These option are specific to Julius, and cannot be used at applications using JuliusLib other than Julius.
-outfileβ On file input, this option write the recognition result of each file to a separate file. The output file of an input file will be the same name but the suffix will be changed to".out". (rev.4.0)-separatescoreβ Output the language and acoustic scores separately.-callbackdebugβ Print the callback names at each call for debug. (rev.4.0)-charconvfrom to β Print with character set conversion. from is the source character set used in the language model, and to is the target character set you want to get.
On Linux, the arguments should be a code name. You can obtain the list of available code names by invoking the command iconv --list. On Windows, the arguments should be a code name or codepage number. Code name should be one of "ansi", "mac", "oem", "utf-7", "utf-8", "sjis", "euc". Or you can specify any codepage number supported at your environment.
-nocharconvβ Disable character conversion.-module[port] β Run Julius on "Server Module Mode". After startup, Julius waits for tcp/ip connection from client. Once connection is established, Julius start communication with the client to process incoming commands from the client, or to output recognition results, input trigger information and other system status to the client. The default port number is10500.-recorddir β Auto-save all input speech data into the specified directory. Each segmented inputs are recorded each by one. The file name of the recorded data is generated from system time when the input ends, in a style ofYYYY.MMDD.HHMMSS.wav. File format is 16bit monoral WAV. Invalid for mfcfile input.
With input rejection by -rejectshort, the rejected input will also be recorded even if they are rejected.
-logfilefile β Save all log output to a file instead of standard output. (Rev.4.0)-nologβ Disable all log output. (Rev.4.0)-helpβ Output help message and exit.
π Global options
These are model-/search-dependent options relating audio input, sound detection, GMM, decoding algorithm, plugin facility, and others. Global options should be placed before any instance declaration (-AM, -LM, or -SR), or just after "-GLOBAL" option.
π€ Audio input
-input{mic|rawfile|mfcfile|adinnet|stdin|netaudio|alsa|oss|esd}β Choose speech input source. Specify'file'or'rawfile'for waveform file,'htkparam'or'mfcfile'for HTK parameter file. On file input, users will be prompted to enter the file name from stdin, or you can use-filelistoption to specify list of files to process.
'mic' is to get audio input from a default live microphone device, and 'adinnet' means receiving waveform data via tcpip network from an adinnet client. 'netaudio' is from DatLink/NetAudio input, and 'stdin' means data input from standard input.
For waveform file input, only WAV (no compression) and RAW (noheader, 16bit, big endian) are supported by default. Other format can be read when compiled with libsnd library. To see what format is actually supported, see the help message using option -help. For stdin input, only WAV and RAW is supported. (default: mfcfile)
At Linux, you can choose API at run time by specifying alsa, oss and esd.
-chunk_sizesamples β Audio fragment size in number of samples. (default:1000)-filelistfilename β (With-input rawfile|mfcfile) perform recognition on all files listed in the file. The file should contain input file per line. Engine will end when all of the files are processed.-notypecheckβ By default, Julius checks the input parameter type whether it matches the AM or not. This option will disable the check and force engine to use the input vector as is.-48β Record input with 48kHz sampling, and down-sample it to 16kHz on-the-fly. This option is valid for 16kHz model only. The down-sampling routine was ported from sptk. (Rev. 4.0)-NAdevicename β Host name for DatLink server input (-input netaudio).-adportport_number β With-input adinnet, specify adinnet port number to listen. (default:5530)-nostripβ Julius by default removes successive zero samples in input speech data. This option inhibits the removal.-zmean,-nozmeanβ This option enables/disables DC offset removal of input waveform. Offset will be estimated from the whole input. For microphone / network input, zero mean of the first 48000 samples (3 seconds in 16kHz sampling) will be used for the estimation. (default: disabled)
This option uses static offset for the channel. See also -zmeansource for frame-wise offset removal.
π Speech detection by level and zero-cross
-cutsilence,-nocutsilenceβ Turn on / off the speech detection by level and zero-cross. Default is on for mic / adinnet input, and off for files.-lvthres β Level threshold for speech input detection. Values should be in range from0to32767. (default:2000)-zcthres β Zero crossing threshold per second. Only input that goes over the level threshold (-lv) will be counted. (default:60)-headmarginmsec β the silence margin at the start of a speech segment, in milliseconds. Default:300. π-tailmarginmsec β same vibe but at the end of the speech segment, in milliseconds. Default:400. π
π« Input rejection
Okay so there are two simple front-end input rejection methods, based on input length and average power of detected segment. The average-power rejection is experimental, and can be enabled by --enable-power-reject on compilation. Valid for MFCC feature with power coefficient and real-time input only.
For GMM-based input rejection, see the GMM section below. π
-rejectshortmsec β Reject input shorter than the specified milliseconds. Search will be terminated and no result will be output. π-powerthresthres β Reject the inputted segment by its average energy. If the average energy of the last recognized input is below the threshold, Julius will reject the input.(Rev.4.0)
This option is valid when --enable-power-reject is specified at compilation time. β οΈ
π§ Gaussian mixture model / GMM-VAD
GMM will be used for input rejection by accumulated score, or for front-end GMM-based VAD when --enable-gmm-vad is specified. It's giving model behavior, fr fr.
NOTE: You should also set the proper MFCC parameters required for the GMM, specifying the acoustic parameters described in AM section -AM_GMM. π
When GMM-based VAD is enabled, the voice activity score will be calculated at each frame as front-end processing. The value will be computed as \[ \max_{m \in M_v} p(x|m) - \max_{m \in M_n} p(x|m) \] where $M_v$ is a set of voice GMM, and $M_n$ is a set of noise GMM whose names should be specified by -gmmreject. The activity score will then be averaged for the last N frames, where N is specified by -gmmmargin. Julius updates the averaged activity score at each frame, and detects speech up-trigger when the value gets higher than a value specified by -gmmup, and detects down-trigger when it gets lower than a value of -gmmdown. β¨
-gmmhmmdefs_file β GMM definition file in HTK format. If specified, GMM-based input verification will be performed concurrently with the 1st pass, and you can reject the input according to the result as specified by-gmmreject. The GMM should be defined as one-state HMMs. π§¬-gmmnumnumber β Number of Gaussian components to be computed per frame on GMM calculation. Only the N-best Gaussians will be computed for rapid calculation. The default is10and specifying smaller value will speed up GMM calculation, but too small value (1or2) may cause degradation of identification performance. β‘-gmmrejectstring β Comma-separated list of GMM names to be rejected as invalid input. When recognition, the log likelihoods of GMMs accumulated for the entire input will be computed concurrently with the 1st pass. If the GMM name of the maximum score is within this string, the 2nd pass will not be executed and the input will be rejected. π«-gmmmarginframes β (GMM_VAD) Head margin in frames. When a speech trigger detected by GMM, recognition will start from current frame minus this value.(Rev.4.0)
This option will be valid only if compiled with --enable-gmm-vad. β οΈ
-gmmupvalue β (GMM_VAD) Up trigger threshold of voice activity score.(Rev.4.1)
This option will be valid only if compiled with --enable-gmm-vad. β οΈ
-gmmdownvalue β (GMM_VAD) Down trigger threshold of voice activity score.(Rev.4.1)
This option will be valid only if compiled with --enable-gmm-vad. β οΈ
π§ Decoding option
Real-time processing means concurrent processing of MFCC computation and 1st pass decoding. By default, real-time processing on the pass is on for microphone / adinnet / netaudio input, and for others. π
-realtime,-norealtimeβ Explicitly switch on / off real-time (pipe-line) processing on the first pass. The default is off for file input, and on for microphone, adinnet and NetAudio input. This option relates to the way CMN and energy normalization is performed: if off, they will be done using average features of whole input. If on, MAP-CMN and energy normalization to do real-time processing. π
π² Misc. options
-Cjconffile β Load a jconf file at here. The content of the jconffile will be expanded at this point. π-versionβ Print version information to standard error, and exit. π-settingβ Print engine setting information to standard error, and exit. βοΈ-quietβ Output less log. For result, only the best word sequence will be printed. π€«-debugβ (For debug) output enormous internal message and debug information to log. π-check {wchmm|trellis|triphone}β For debug, enter interactive check mode. π΅οΈ-plugindirdirlist β Specify directory to load plugin. If several directories exist, specify them by colon-separated list. π§©
π§© Instance declaration for multi decoding
The following arguments will create a new configuration set with default parameters, and switch the current set to it. Jconf parameters specified after the option will be set into the current set.
To do multi-model decoding, these arguments should be specified at the first of each model / search instances with different names. Any options before the first instance definition will be IGNORED. π¨
When no instance definition is found (as older version of Julius), all the options are assigned to a default instance named _default.
Please note that decoding with a single LM and multiple AMs is not fully supported. For example, you may want to construct the jconf file as following.
This type of model sharing is not supported yet, since some part of LM processing depends on the assigned AM. Instead, you can get the same result by defining the same LMs for each AM, like this:
-AMname β Create a new AM configuration set, and switch current to the new one. You should give a unique name.(Rev.4.0)-LMname β Create a new LM configuration set, and switch current to the new one. You should give a unique name.(Rev.4.0)-SRname am_name lm_name β Create a new search configuration set, and switch current to the new one. The specified AM and LM will be assigned to it. The am_name and lm_name can be either name or ID number. You should give a unique name.(Rev.4.0)-AM_GMMβ When using GMM for front-end processing, you can specify GMM-specific acoustic parameters after this option. If you does not specify-AM_GMMwith GMM, the GMM will share the same parameter vector as the last AM. The current AM will be switched to the GMM one, so be careful not to confuse with normal AM configurations.(Rev.4.0)-GLOBALβ Start a global section. The global options should be placed before any instance declaration, or after this option on multiple model recognition. This can be used multiple times.(Rev.4.1)-nosectioncheck,-sectioncheckβ Disable / enable option location check in multi-model decoding. When enabled, the options between instance declaration is treated as "sections" and only the belonging option types can be written. For example, when an option-AMis specified, only the AM related option can be placed after the option until other declaration is found. Also, global options should be placed at top, before any instance declarataion. This is enabled by default.(Rev.4.1)
π£οΈ Language model (-LM)
This group contains options for model definition of each language model type. When using multiple LM, one instance can have only one LM.
Only one type of LM can be specified for a LM configuration. If you want to use multi model, you should define them one as a new LM.
π N-gram
-dbingram_file β Use binary format N-gram. An ARPA N-gram file can be converted to Julius binary format bymkbingram. πΎ-nlrarpa_ngram_file β A forward, left-to-right N-gram language model in standard ARPA format. When both a forward N-gram and backward N-gram are specified, Julius uses this forward 2-gram for the 1st pass, and the backward N-gram for the 2nd pass.
Since ARPA file often gets huge and requires a lot of time to load, it may be better to convert the ARPA file to Julius binary format by mkbingram. Note that if both forward and backward N-gram is used for recognition, they together will be converted to a single binary.
When only a forward N-gram is specified by this option and no backward N-gram specified by -nrl, Julius performs recognition with only the forward N-gram. The 1st pass will use the 2-gram entry in the given N-gram, and The 2nd pass will use the given N-gram, with converting forward probabilities to backward probabilities by Bayes rule. (Rev.4.0)
-nrlarpa_ngram_file β A backward, right-to-left N-gram language model in standard ARPA format. When both a forward N-gram and backward N-gram are specified, Julius uses the forward 2-gram for the 1st pass, and this backward N-gram for the 2nd pass.
Since ARPA file often gets huge and requires a lot of time to load, it may be better to convert the ARPA file to Julius binary format by mkbingram. Note that if both forward and backward N-gram is used for recognition, they together will be converted to a single binary.
When only a backward N-gram is specified by this option and no forward N-gram specified by -nlr, Julius performs recognition with only the backward N-gram. The 1st pass will use the forward 2-gram probability computed from the backward 2-gram using Bayes rule. The 2nd pass fully use the given backward N-gram. (Rev.4.0)
-vdict_file β Word dictionary file. π-silheadword_string,-siltailword_string β Silence word defined in the dictionary, for silences at the beginning of sentence and end of sentence. (default:"<s>","</s>")-mapunkword_string β Specify unknown word. Default is"<unk>"or"<UNK>". This will be used to assign word probability on unknown words, i.e. words in dictionary that are not in N-gram vocabulary.-iwspwordβ Add a word entry to the dictionary that should correspond to inter-word pauses. This may improve recognition accuracy in some language model that has no explicit inter-word pause modeling. The word entry to be added can be changed by-iwspentry.-iwspentryword_entry_string β Specify the word entry that will be added by-iwspword. (default:"<UNK> [sp] sp sp")-sepnumnumber β Number of high frequency words to be isolated from the lexicon tree, to ease approximation error that may be caused by the one-best approximation on 1st pass. (default:150)
β¨ Grammar β¨
Multiple grammars can be specified by repeating -gram and -gramlist. Note that this is unusual behavior from other options (in normal Julius option, last one will override previous ones). You can use -nogram to reset the grammars already specified before the point.
-gramgramprefix1[,gramprefix2[,gramprefix3,...]] β Comma-separated list of grammars to be used. The argument should be a prefix of a grammar, i.e. if you havefoo.dfaandfoo.dict, you should specify them with a single argumentfoo. Multiple grammars can be specified at a time as a comma-separated list.-gramlistlist_file β Specify a grammar list file that contains list of grammars to be used. The list file should contain the prefixes of grammars, each per line. A relative path in the list file will be treated as relative to the file, not the current path or configuration file.-dfadfa_file,-vdict_file β An old way of specifying grammar files separately. This is bogus, and should not be used any more.
π« bestie, do NOT use-dfa/-v. It's giving deprecated. Periodt.
-nogramβ Remove the current list of grammars already specified by-gram,-gramlist,-dfaand-v.
β¨ Isolated word β¨
Dictionary can be specified by using -w and -wlist. When you specify multiple times, all of them will be read at startup. You can use -nogram to reset the already specified dictionaries at that point.
-wdict_file β Word dictionary for isolated word recognition. File format is the same as other LM. (Rev.4.0)-wlistlist_file β Specify a dictionary list file that contains list of dictionaries to be used. The list file should contain the file name of dictionaries, each per line. A relative path in the list file will be treated as relative to the list file, not the current path or configuration file. (Rev.4.0)-nogramβ Remove the current list of dictionaries already specified by-wand-wlist.-wsilhead_sil_model_name tail_sil_model_name sil_context_name β On isolated word recognition, silence models will be appended to the head and tail of each word at recognition. This option specifies the silence models to be appended.sil_context_nameis the name of the head sil model and tail sil model as a context of word head phone and tail phone. For example, if you specify-wsil silB silE sp, a word with phone sequenceb eh twill be translated assilB sp-b+eh b-eh+t eh-t+sp silE. (Rev.4.0)
β¨ User-defined LM β¨
-userlmβ Declare to use user LM functions in the program. This option should be specified if you use user-defined LM functions. (Rev.4.0)
β¨ Misc. LM options β¨
-forcedictβ Skip error words in dictionary and force running.
β¨ Acoustic model and feature analysis (-AM) (-AM_GMM) β¨
This section is about options for acoustic model, feature extraction, feature normalizations and spectral subtraction.
After -AM name, an acoustic model and related specification should be written. You can use multiple AMs trained with different MFCC types. For GMM, the required parameter condition should be specified just as same as AMs after -AM_GMM.
When using multiple AMs, the values of -smpPeriod, -smpFreq, -fsize and -fshift should be the same among all AMs.
β¨ Acoustic HMM β¨
-hhmmdef_file β Acoustic HMM definition file. It should be in HTK ascii format, or Julius binary format. You can convert HTK ascii format to Julius binary format usingmkbinhmm.-hlisthmmlist_file β HMMList file for phone mapping. This file provides mapping between logical triphone names generated in the dictionary and the defined HMM names in hmmdefs. This option should be specified for context-dependent model.-tmixnumber β Specify the number of top Gaussians to be calculated in a mixture codebook. Small number will speed up the acoustic computation, but AM accuracy may get worse with too small value. See also-gprune. (default:2)-spmodelname β Specify HMM model name that corresponds to short-pause in an utterance. The short-pause model name will be used in recognition: short-pause skipping on grammar recognition, word-end short-pause model insertion with-iwspon N-gram, or short-pause segmentation (-spsegment). (default:"sp")-multipathβ Enable multi-path mode. To make decoding faster, Julius by default impose a limit on HMM transitions that each model should have only one transition from initial state and to end state. On multi-path mode, Julius does extra handling on inter-model transition to allows model-skipping transition and multiple output/input transitions. Note that specifying this option will make Julius a bit slower, and the larger beam width may be required.
This function was a compilation-time option on Julius 3.x, and now becomes a run-time option. By default (without this option), Julius checks the transition type of specified HMMs, and enable the multi-path mode if required. You can force multi-path mode with this option. (rev.4.0)
-gprune{safe|heuristic|beam|none|default} β Set Gaussian pruning algorithm to use. For tied-mixture model, Julius performs Gaussian pruning to reduce acoustic computation, by calculating only the top N Gaussians in each codebook at each frame. The default setting will be set according to the model type and engine setting.defaultwill force accepting the default setting. Set this tononeto disable pruning and perform full computation.safeguarantees the top N Gaussians to be computed.heuristicandbeamdo more aggressive computational cost reduction, but may result in small loss of accuracy model (default:safe(standard),beam(fast) for tied mixture model,nonefor non tied-mixture model).-iwcd1{max|avg|best number} β Select method to approximate inter-word triphone on the head and tail of a word in the first pass.
max will apply the maximum likelihood of the same context triphones. avg will apply the average likelihood of the same context triphones. best number will apply the average of top N-best likelihoods of the same context triphone.
Default is best 3 for use with N-gram, and avg for grammar and word. When this AM is shared by LMs of both type, latter one will be chosen.
-iwsppenaltyfloat β Insertion penalty for word-end short pauses appended by-iwsp.-gshmmhmmdef_file β If this option is specified, Julius performs Gaussian Mixture Selection for efficient decoding. The hmmdefs should be a monophone model generated from an ordinary monophone HMM model, usingmkgshmm.-gsnumnumber β On GMS, specify number of monophone states to compute corresponding triphones in detail. (default:24)
β¨ Speech analysis β¨
Only MFCC feature extraction is supported in current Julius. Thus when recognizing a waveform input from file or microphone, AM must be trained by MFCC. The parameter condition should also be set as exactly the same as the training condition by the options below.
When you give an input in HTK Parameter file, you can use any parameter type for AM. In this case Julius does not care about the type of input feature and AM, just read them as vector sequence and match them to the given AM. Julius only checks whether the parameter types are the same. If it does not work well, you can disable this checking by -notypecheck.
In Julius, the parameter kind and qualifiers (as TARGETKIND in HTK) and the number of cepstral parameters (NUMCEPS) will be set automatically from the content of the AM header, so you need not specify them by options.
Other parameters should be set exactly the same as training condition. You can also give a HTK Config file which you used to train AM to Julius by -htkconf. When this option is applied, Julius will parse the Config file and set appropriate parameter.
You can further embed those analysis parameter settings to a binary HMM file using mkbinhmm.
If options specified in several ways, they will be evaluated in the order below. The AM embedded parameter will be loaded first if any. Then, the HTK config file given by -htkconf will be parsed. If a value already set by AM embedded value, HTK config will override them. At last, the direct options will be loaded, which will override settings loaded before. Note that, when the same options are specified several times, later will override previous, except that -htkconf will be evaluated first as described above.
-smpPeriodperiod β the sampling period of the input speech, measured in units of 100 nanoseconds. You can set the sampling rate with-smpFreqinstead if you'd rather, but heads up bestie: the input frequency has to match the training conditions of the AM. (default:625, which is 16,000Hz)
This one lines up with the HTK Option SOURCERATE, and you can hand it the same value.
When you're running multiple AMs, this value needs to be the same across all of them.
-smpFreqHz β sets the sampling frequency of the input speech in Hz. Same deal as-smpPeriod, you can go either way. And again, this frequency should equal the training conditions of the AM. (default:16,000)
With multiple AMs, keep this the same across all of them too.
-fsizesample_num β window size, in number of samples. (default:400)
Corresponds to the HTK Option WINDOWSIZE, except your value is in samples (HTK value / smpPeriod).
Multiple AMs? Same value for all of them, periodt.
-fshiftsample_num β frame shift in number of samples. (default:160)
Corresponds to the HTK Option TARGETRATE, but again, your value is in samples (HTK value / smpPeriod).
You already know: multiple AMs, same value everywhere.
-preemphfloat β pre-emphasis coefficient. (default:0.97)
Corresponds to the HTK Option PREEMCOEF, and the same value works here too.
-fbanknum β number of filterbank channels. (default:24)
Corresponds to the HTK Option NUMCHANS, same value accepted. But be aware that the default is not the same as in HTK (which is 22). π
-ceplifnum β cepstral liftering coefficient. (default:22)
Corresponds to the HTK Option CEPLIFTER, and yeah, the same value can go here.
-rawe,-noraweβ enable/disable using raw energy before pre-emphasis. (default: disabled)
Corresponds to the HTK Option RAWENERGY. Be aware that the default differs from HTK β HTK has it enabled, Julius has it disabled.
-enormal,-noenormalβ enable/disable normalizing log energy. On live input, this normalization gets approximated from the average of the last input. (default: disabled)
Corresponds to the HTK Option ENORMALISE. Be aware that the default differs from HTK β enabled at HTK, disabled at Julius.
-escalefloat_scale β scaling factor of log energy when normalizing log energy. (default:1.0)
Corresponds to the HTK Option ESCALE. Be aware that the default differs from HTK (which is 0.1).
-silfloorfloat β energy silence floor in dB when normalizing log energy. (default:50.0)
Corresponds to the HTK Option SILFLOOR.
-delwinframe β delta window size in number of frames. (default:2)
Corresponds to the HTK Option DELTAWINDOW, and the same value can be given.
-accwinframe β acceleration window size in number of frames. (default:2)
Corresponds to the HTK Option ACCWINDOW, same value works.
-hifreqHz β enable band-limiting for MFCC filterbank computation: sets the upper frequency cut-off. A value of-1disables it. (default:-1)
Corresponds to the HTK Option HIFREQ, and the same value can be given.
-lofreqHz β enable band-limiting for MFCC filterbank computation: sets the lower frequency cut-off. A value of-1disables it. (default:-1)
Corresponds to the HTK Option LOFREQ, and the same value can be given.
-zmeanframe,-nozmeanframeβ with speech input, this enables/disables frame-wise DC offset removal. Corresponds to the HTK configurationZMEANSOURCE. This cannot be used together with-zmean. (default: disabled)-usepowerβ use power instead of magnitude on filterbank analysis. (default: disabled)
π Normalization π
Julius can do cepstral mean normalization (CMN) for inputs. CMN kicks in when the AM you're using was trained with CMN β meaning it has the "_Z" qualifier in the header.
The cepstral mean gets estimated differently depending on the input type. On file input, the mean is computed from the whole input. On live input like microphone and network input, the cepstral mean of the input is unknown at the start π so MAP-CMN is used instead. In MAP-CMN, an initial mean vector gets applied at the beginning, and the mean vector gets smeared toward the mean of the incrementing input vector as input comes in. The options below control how MAP-CMN behaves.
-cvnβ enable cepstral variance normalization. At file input, the variance of the whole input gets calculated and then applied. At live microphone input, the variance of the last input is applied. CVN is only supported for an audio input.-vtlnalpha lowcut hicut β do frequency warping, typically for a vocal tract length normalization (VTLN). The arguments are warping factor, high frequency cut-off and low freq. cut-off. These correspond to the HTK Config valuesWARPFREQ,WARPHCUTOFFandWARPLCUTOFF.-cmnloadfile β load an initial cepstral mean vector from a file on startup. The file should be one saved by-cmnsave. Loading an initial cepstral mean lets Julius recognize the first utterance better on a real-time input. When used together with-cmnnoupdate, this initial value gets used for all input.-cmnsavefile β save the calculated cepstral mean vector into a file. Parameters get saved at each input end. If the output file already exists, it will be overridden.-cmnupdate,-cmnnoupdateβ control whether to update the cepstral mean at each input on real-time input. Disabling this and specifying-cmnloadmakes the engine always use the loaded static initial cepstral mean.-cmnmapweightfloat β specify the weight of the initial cepstral mean for MAP-CMN. Go larger to retain the initial cepstral mean for a longer period, go smaller to make the cepstral mean rely more on the current input. (default:100.0)
π Front-end processing π
Julius can perform spectral subtraction to reduce some stationary noise from audio input. Ngl it's not the most powerful method, but it can work in some situations. Julius has two ways to estimate the noise spectrum. One way assumes the first short segment of a speech input is a noise segment, and estimates the noise spectrum as the average of that segment. The other way calculates the average spectrum from noise-only input using another tool, mkss, and loads it into Julius. The former is popular for speech file input, and the latter should be used for live input. The options below switch and control the behavior.
-sscalcβ perform spectral subtraction using the head part of each file as the silence part. The head part length should be specified by-sscalclen. Valid only for file input. Conflicts with-ssload.-sscalclenmsec β with-sscalc, specify the length of head silence for noise spectrum estimation, in milliseconds. (default:300)-ssloadfile β perform spectral subtraction for speech input using a pre-estimated noise spectrum loaded from a file. The noise spectrum file can be made bymkss. Valid for all speech input. Conflicts with-sscalc.-ssalphafloat β alpha coefficient of spectral subtraction for-sscalcand-ssload. The larger this value gets, the stronger the noise gets subtracted β but the distortion of the resulting signal also becomes remarkable. (default:2.0)-ssfloorfloat β flooring coefficient of spectral subtraction. Spectral power that goes below zero after subtraction gets substituted by the source signal multiplied by this coefficient. (default:0.5)
β¨ Misc. AM options β¨
-htkconffile β parse the given HTK Config file, and set corresponding parameters in Julius. When you use this option, the default parameter values switch from Julius defaults to HTK defaults.
π Recognition process and search (-SR) π
This section is all about the search parameters for the 1st / 2nd pass β beam width, LM weights, that whole vibe β plus configs for short-pause segmentation, switches for word lattice output and confusion network output, forced alignments, and other options relating to the recognition process and result output. π«Ά
Default values for beam width and LM weights change depending on the compile-time setup of JuliusLib, the AM model type, and the LM size. So bestie, please check the startup log for the actual values. π
π 1st pass parameters π
-lmpweight penalty β (N-gram) language model weights and word insertion penalties for the first pass.-penalty1penalty β (Grammar) word insertion penalty for the first pass. (default:0.0)-bwidth β beam width in number of HMM nodes for rank beaming on the first pass. This value defines the search width on the 1st pass, and it has the dominant effect on total processing time. A smaller width speeds up decoding, but too small a value causes a substantial increase of recognition errors from search failure π. A larger value makes the search stable and leads to failure-free search, but processing time grows in proportion to the width.
The default value is dependent on acoustic model type: 400 (monophone), 800 (triphone), or 1000 (triphone, setup=v2.1) π
-nlimitnum β the upper limit of tokens per node, bestie. Heads up tho: this one only does anything when--enable-wpairand--enable-wpair-nlimitwere both turned on at compilation time. π-progoutβ turns on progressive output of the partial results on the first pass. Little sneak peeks while it's still thinking π-progintervalmsec β sets the time interval for-progout, in milliseconds. (default:300)
πΈ 2nd pass parameters πΈ
-lmp2weight penalty β the (N-gram) language model weights and word insertion penalties for the second pass.-penalty2penalty β the (Grammar) word insertion penalty for the second pass. (default:0.0)-b2width β envelope beam width (i.e. number of hypothesis) at the second pass. If the count of word expansion at a certain hypothesis length hits this limit while searching, the shorter hypotheses stop expanding any further. This is the thing that keeps the search from falling into a breadth-first-like situation stacking up on the same position, and it improves search failure mostly for large vocabulary conditions. (default:30)-sbfloat β score envelope width for enveloped scoring. When Julius calculates the hypothesis score for each generated hypothesis, its trellis expansion and Viterbi operation get pruned mid-speech if the score on a frame dips under the width. Give it a small value and the second pass goes faster, but computation error may occur π (default:80.0)-snum β stack size, aka the maximum number of hypothesis that can be stored on the stack during the search. Bigger value may give you more stable results, but it also eats more memory. (default:500)-mcount β the number of expanded hypotheses required to discontinue the search. If the number of expanded hypotheses is greater than this threshold, the search is discontinued right there. The larger this value is, the longer Julius gets to give up on the search. (default:2000)-nnum β how many candidates Julius tries to find. The search keeps going till this number of sentence hypotheses have been found. Those sentence hypotheses get sorted by score, and the final result is displayed in that order (see also-output). The chance that the optimum hypothesis is correctly found goes up as this value grows, but the processing time gets longer too. The default depends on the engine setup at compilation time:10(standard) or1(fast or v2.1)-outputnum β the top N sentence hypothesis to be output at the end of the search. Use it with-n. (default:1)-lookuprangeframe β sets how many frames before and after Julius should look up next word hypotheses in the word trellis on the second pass. This stops short words from getting omitted, but with a large value the number of expanded hypotheses grows and the whole system gets slow π (default:5)-looktrellisβ (Grammar) expand only the words that survived the first pass, instead of expanding every word the grammar predicted. This makes second pass decoding faster, especially in large vocabulary conditions, but it may increase deletion error of short words. (default: disabled)
π¦ Short-pause segmentation / decoder-VAD π¦
When compiled with --enable-decoder-vad, the short-pause segmentation gets extended to support decoder-based VAD. β¨
-spsegmentβ enable short-pause segmentation mode. Input gets segmented when a short pause word (a word with only a silence model in its pronunciation) gets the highest likelihood at certain successive frames on the first pass. When it detects a segment end, Julius stops the 1st pass at that point, performs the 2nd pass, and continues with the next segment. The word context gets considered among segments. (Rev.4.0)
And when compiled with --enable-decoder-vad, this option enables decoder-based VAD, so it can skip long silence. π€«
-spdurframe β short pause duration length to detect the end of an input segment, in number of frames. (default:10)-pausemodelsstring β a comma-separated list of pause model names to be used at short-pause segmentation. Any word whose pronunciation consists of only the pause models gets treated as a "pause word" and used for pause detection. If you don't specify it, the names of-spmodel,-silheadand-siltailwill be used instead. (Rev.4.0)-spmarginframe β back step margin at trigger up for decoder-based VAD. When a speech up-trigger is found by decoder-VAD, Julius rewinds the input parameter by this value and starts recognition at that point. (Rev.4.0)
This option is valid only if compiled with --enable-decoder-vad.
-spdelayframe β trigger decision delay frame at trigger up for decoder-based VAD. (Rev.4.0)
This option is valid only if compiled with --enable-decoder-vad.
π Word lattice / confusion network output π
-lattice,-nolatticeβ enable / disable generation of the word graph. The search algorithm has changed too, to optimize for better word graph generation, so the sentence result may not be the same as normal N-best recognition. (Rev.4.0)-confnet,-noconfnetβ enable / disable generation of the confusion network. Turning this on also activates-latticeinternally. (Rev.4.0)-graphrangeframe β merge same words at neighbour positions during graph generation. If the beginning time and ending time of two word candidates of the same word fall within the specified range, they get merged. The default is0(allow merging same words on exactly the same location), and specifying a larger value results in a smaller graph output. Setting this value to-1disables merging β in that case same words on the same location with different scores are left as they are. (default:0)-graphcutdepth β cut the resulting graph by its word depth at the post-processing stage. The depth value is the number of words allowed at a frame. Setting it to-1disables this feature. (default:80)-graphboundloopcount β limit the number of boundary adjustment loops at the post-processing stage. This parameter keeps Julius from blocking on an infinite adjustment loop caused by short word oscillation. (default:20)-graphsearchdelay,-nographsearchdelayβ when enabled, Julius modifies its graph generation algorithm on the 2nd pass so it doesn't terminate the search by graph merging until the first sentence candidate is found. This may improve graph accuracy, especially when you're going to generate a huge word graph by setting a broad search. Like, it may give better graph accuracy when you set wide beams on both 1st pass-band 2nd pass-b2, and a large number for-n. (default: disabled)
π Multi-gram / multi-dic recognition π
-multigramout,-nomultigramoutβ on grammar recognition using multiple grammars, Julius outputs only the best result among all grammars. Enabling this option makes Julius output a result for each grammar. (default: disabled)
π Forced alignment π
-walignβ do Viterbi alignment per word units for the recognition result. The word boundary frames and the average acoustic scores per frame get calculated.-palignβ do Viterbi alignment per phone units for the recognition result. The phone boundary frames and the average acoustic scores per frame get calculated.-salignβ do Viterbi alignment per state for the recognition result. The state boundary frames and the average acoustic scores per frame get calculated.
β Misc. search options β
-inactiveβ start this recognition process instance in an inactive state. (Rev.4.0)-1passβ perform only the first pass.-fallback1passβ when the 2nd pass fails, Julius normally finishes the recognition with no result. This option tells Julius to output the 1st pass result as the final result when the 2nd pass fails. Note that some score output (confidence etc.) may not be useful. This was the default behaviour of Julius-3.x. π-no_ccd,-force_ccdβ explicitly switch phone context handling at search. Normally Julius figures out whether the AM in use is a context-dependent model or not from the model names β i.e. whether the names contain the characters+and-. This option overrides that automatic detection.-cmalphafloat β smoothing parameter for confidence scoring. (default:0.05)-iwspβ (Multi-path mode only) enable inter-word context-free short pause insertion. This option appends a skippable short pause model for every word end. That short-pause model can be specified by-spmodel.-transpfloat β additional insertion penalty for transparent words. (default:0.0)-demoβ equivalent to-progout -quiet.
π ENVIRONMENT VARIABLES π
ALSADEVβ (when using mic input with an alsa device) specify a capture device name. If you don't specify one,"default"gets used.AUDIODEVβ (when using mic input with an oss device) specify a capture device path. If you don't specify one,/dev/dspgets used.LATENCY_MSECβ try to set the input latency of microphone input in milliseconds. A smaller value shortens latency but sometimes makes the process unstable π The default value depends on the running OS.
π EXAMPLES π
Bestie, if you wanna see how this thing actually gets used in the wild, the move is the tutorial section in the Julius documents. That's where the real examples live. Go look, it's giving study session π
β¨ NOTICE β¨
Okay this one is so important, listen up π«Ά β a note about jconf files: any relative paths inside a jconf file are interpreted as relative to the jconf file itself, NOT relative to the current directory.
Not me almost losing my mind over this the first time π it's the jconf file's own little world, okay? Relative paths belong to it, not to wherever you happen to be standing in your terminal. Periodt.
π¦ SEE ALSO π¦
The whole squad, assembled:
julian(1)jcontrol(1)adinrec(1)adintool(1)mkbingram(1)mkbinhmm(1)mkgsmm(1)wav2mfcc(1)mkss(1)
And the link, the sacred URL:
http://julius.sourceforge.jp/en/
π DIAGNOSTICS π
Here's the vibe check on exit codes, no cap:
- Normally, Julius returns the exit status
0. Slay, all good, nothing to see here β¨ - If an error occurs, Julius exits abnormally with exit status
1. That's the "something went wrong bestie" number π - If an input file cannot be found, or cannot be loaded for some reason, Julius will skip processing for that file. It's not gonna crash the whole party over one missing guest π
πΈ BUGS πΈ
Real talk β there are some restrictions to the type and size of the models Julius can use. For a detailed explanation, refer to the Julius documentation, because this is genuinely a "read the docs" situation, iykyk π
And if you've got bug reports, inquiries, or comments, please hit up:
julius-info at lists.sourceforge.jp
They wanna hear from you, fr fr π«Ά
π COPYRIGHT π
The legal lore, preserved exactly:
Copyright (c) 1991-2008 Kawahara Lab., Kyoto University
Copyright (c) 1997-2000 Information-technology Promotion Agency, Japan
Copyright (c) 2000-2008 Shikano Lab., Nara Institute of Science and Technology
Copyright (c) 2005-2008 Julius project team, Nagoya Institute of Technology
β AUTHORS β
The origin story, era by era π
Rev.1.0 (1998/02/20)
- Designed by Tatsuya KAWAHARA and Akinobu LEE (Kyoto University)
- Development by Akinobu LEE (Kyoto University)
Rev.1.1 (1998/04/14), Rev.1.2 (1998/10/31), Rev.2.0 (1999/02/20), Rev.2.1 (1999/04/20), Rev.2.2 (1999/10/04), Rev.3.0 (2000/02/14), Rev.3.1 (2000/05/11)
- Development of above versions by Akinobu LEE (Kyoto University)
Rev.3.2 (2001/08/15), Rev.3.3 (2002/09/11), Rev.3.4 (2003/10/01), Rev.3.4.1 (2004/02/25), Rev.3.4.2 (2004/04/30)
- Development of above versions by Akinobu LEE (Nara Institute of Science and Technology)
Rev.3.5 (2005/11/11), Rev.3.5.1 (2006/03/31), Rev.3.5.2 (2006/07/31), Rev.3.5.3 (2006/12/29), Rev.4.0 (2007/12/19), Rev.4.1 (2008/10/03)
- Development of above versions by Akinobu LEE (Nagoya Institute of Technology)
π THANKS TO π
The shoutout section, because you always thank the people who helped you glow up:
- From rev.3.2, Julius is released by the "Information Processing Society, Continuous Speech Consortium". Iconic.
- The Windows DLL version was developed and released by Hideki BANNO (Nagoya University). Windows girlies, say thank you π«Ά
- The Windows Microsoft Speech API compatible version was developed by Takashi SUMIYOSHI (Kyoto University). Legend behaviour.
And that's the whole page, bestie β we made it to the end π This is from the 02/11/2009 version of the JULIUS(1) manual page. Take care of her, she's been through a lot since 1991 πβ¨
π¦ where this page comes from
- ubuntu jammy: julius 4.2.2-0ubuntu3
- ubuntu noble: julius 4.2.2-0ubuntu6
- ubuntu resolute: julius 4.2.2-0ubuntu6
- ubuntu stonking: julius 4.2.2-0ubuntu6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms