You can find my new blog, "The Grand Janitor Blog V2" at www.thegrandjanitor.com. I already write one message there. Hope you enjoy.
Arthur
1: import multiprocessing
2: import subprocess
3: jobs = []
4: for i in range (N):
5: p = multiprocessing.Process(target=process, \
6: name = 'TASK' + str(i), \
7: args=(i, ......
8: )
9: )
10: jobs.append(p)
11: p.start()
12: for j in jobs:
13: if j.is_alive():
14: print 'Waiting for job %s' %(j.name)
15: j.join()
kb_init
-> kbcore_init (*)
-> beam_init
-> pl_init
-> fe_init
-> feat_array
-> stat_init
-> adapt_am_init
-> set operation mode
-> srch_init
kbcore_init
-> Look for feat.params very early on.
-> logmath_init
-> feat_init
-> s3_am_init (*)
-> cmn_init
-> dict_init
-> misc. models init
mgau_init such as
-> subvq_init
-> gs_read
-> lmset_init
-> fillpen_init
-> dict2pid_build <- Should put into search
s3_am_init
-> read_lda
-> read in mdef.
-> depends on -senmgau type
.cont. mgau_init
.s2semi. s2_semi_mgau_init
if (-kdtree)
s2_semi_mgau_load_kdtree
.semi or .s3cont.
ms_mgau_init
-> tmat_init
next_utt_state.c
-> mk_wordlist (mk_wordlist.c)
-> mk_phone_list (mk_phonelist.c)
-> cvt2triphone (cvt2triphone.c)
-> state_seq_make (state_seq_make.c)
char **mk_wordlist(char *str,
uint32 *n_word)
{
uint32 n_w;
uint32 i;
char **wl;
n_w = n_words(str);
wl = ckd_calloc(n_w, sizeof(char *));
wl[0] = strtok(str, " \t");
for (i = 1; i < n_w; i++) {
wl[i] = strtok(NULL, " \t");
}
assert(strtok(NULL, " \t") == NULL);
*n_word = n_w;
return wl;
}
1: acmod_id_t *mk_phone_list(char **btw_mark,
2: uint32 *n_phone,
3: char **word,
4: uint32 n_word,
5: lexicon_t *lex)
6: {
7: uint32 n_p;
8: lex_entry_t *e;
9: char *btw;
10: unsigned int i, j, k;
11: acmod_id_t *p;
12: /*
13: * Determine the # of phones in the sequence.
14: */
15: for (i = 0, n_p = 0; i < n_word; i++) {
16: e = lexicon_lookup(lex, word[i]);
17: if (e == NULL) {
18: E_WARN("Unable to lookup word '%s' in the lexicon\n", word[i]);
19: return NULL;
20: }
21: n_p += e->phone_cnt;
22: }
23: /*
24: * Allocate the phone sequence
25: */
26: p = ckd_calloc(n_p, sizeof(acmod_id_t));
27: /*
28: * Allocate the between word markers
29: */
30: btw = ckd_calloc(n_p, sizeof(char));
31: for (i = 0, k = 0; i < n_word; i++) { /* for each word */
32: e = lexicon_lookup(lex, word[i]);
33: if (e->phone_cnt == 0) /* Ignore words with no pronunciation */
34: continue;
35: for (j = 0; j < e->phone_cnt-1; j++, k++) { /* for all but the last phone in the word */
36: p[k] = e->ci_acmod_id[j];
37: }
38: p[k] = e->ci_acmod_id[j]; /* move over the last phone */
39: btw[k] = TRUE; /* mark word boundary following
40: kth phone */
41: ++k;
42: }
43: *btw_mark = btw;
44: *n_phone = n_p;
45: assert(k == n_p);
46: return p;
47: }
word[0] -> MY
word[1] -> NAME
word[2] -> IS
word[3] -> CLINTON
ph[0] -> M btw[0] -> 0
ph[1] -> AY btw[1] -> 1
ph[2] -> N btw[2] -> 0
ph[3] -> EY btw[3] -> 0
ph[4] -> M btw[4] -> 1
ph[5] -> IY btw[5] -> 0
ph[6] -> S btw[6] -> 1
ph[7] -> K btw[7] -> 0
ph[8] -> L btw[8] -> 0
ph[9] -> IY btw[9] -> 0
ph[10] -> N btw[10] -> 0
ph[11] -> T btw[11] -> 0
ph[12] -> AX btw[12] -> 0
pH[13] -> N btw[13] -> 1
1: typedef unsigned char ci_acmod_id_t;
2: #define NO_CI_ACMOD (0xff)
3: #define MAX_CI_ACMOD (0xfe)
4: typedef uint32 acmod_id_t;
5: #define NO_ACMOD (0xffffffff) /* The ID representing no acoustic
6: * model. */
7: #define MAX_ACMOD (0xfffffffe) /* The max ID possible */