/
make_duration.c
39 lines (34 loc) · 1.05 KB
/
make_duration.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* Copyright (c) 2000-2006 */
/* Takao Kobayashi, Takashi Masuko, Masatsune Tamura */
/* (Tokyo Institute of Technology) */
/* Keiichi Tokuda, Takayoshi Yoshimura, Heiga Zen */
/* (Nagoya Institute of Technology) */
/* All rights reserved */
/* */
/* $Id: make_duration.c,v 1.8 2007/07/12 06:10:45 sako Exp $ */
#include <stdio.h>
#include <string.h>
#include "synthesis.h"
#include "defaults.h"
#include "misc.h"
#include "model.h"
#include "tree.h"
#include "confpara.h"
#include "hmmsynth.h"
void make_duration(){
PHONEME *p;
Model *m;
int sid;
m = mhead;
totalframe = 0;
for (;;)
{
p = m->phoneme;
sid = p->sid;
m->durpdf = strdup(TraverseTree(m->name,mset[sid].thead[DURATION]->parent));
SearchDurationPDF (m, sid);
p->time = m->totalduration * FRAME_RATE;
if (m == mtail) break;
m = m->next;
}
}