Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down
3 changes: 3 additions & 0 deletions src/NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 1.10:
* bug fixes.

Version 1.09:
* add '-g' option to change volume.
* add some functions to get fullcontext label format and version defined in HTS voice.
Expand Down
7 changes: 3 additions & 4 deletions src/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===============================================================================
The HMM-Based Speech Synthesis Engine "hts_engine API" version 1.09
release December 25, 2014
The HMM-Based Speech Synthesis Engine "hts_engine API" version 1.10
release December 25, 2015


The hts_engine API is an API version of hts_engine which has been released
Expand All @@ -25,7 +25,7 @@ the conditions in the following license:
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down Expand Up @@ -115,7 +115,6 @@ Synthesis System. Current members are
Keiichiro Oura http://www.sp.nitech.ac.jp/~uratec/
(Design and Development, Main Maintainer)
Kei Hashimoto http://www.sp.nitech.ac.jp/~bonanza/
Sayaka Shiota http://www.sp.nitech.ac.jp/~sayaka/
Shinji Takaki http://www.sp.nitech.ac.jp/~k-prr44/
Heiga Zen
Junichi Yamagishi http://homepages.inf.ed.ac.uk/jyamagis/
Expand Down
2 changes: 1 addition & 1 deletion src/bin/hts_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down
4 changes: 2 additions & 2 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(hts_engine_API, 1.09, hts-engine-users@lists.sourceforge.net, hts_engine_API)
AC_INIT(hts_engine_API, 1.10, hts-engine-users@lists.sourceforge.net, hts_engine_API)
AC_CONFIG_AUX_DIR([config])
AC_COPYRIGHT(Copyright 2001-2014 Nagoya Institute of Technology)
AC_COPYRIGHT(Copyright 2001-2015 Nagoya Institute of Technology)
AC_COPYRIGHT(Copyright 2001-2008 Tokyo Institute of Technology)
AM_INIT_AUTOMAKE

Expand Down
4 changes: 2 additions & 2 deletions src/include/HTS_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down Expand Up @@ -87,7 +87,7 @@ typedef char HTS_Boolean;

/* copyright ------------------------------------------------------- */

#define HTS_COPYRIGHT "The HMM-Based Speech Synthesis Engine \"hts_engine API\"\nVersion 1.09 (http://hts-engine.sourceforge.net/)\nCopyright (C) 2001-2014 Nagoya Institute of Technology\n 2001-2008 Tokyo Institute of Technology\nAll rights reserved.\n"
#define HTS_COPYRIGHT "The HMM-Based Speech Synthesis Engine \"hts_engine API\"\nVersion 1.10 (http://hts-engine.sourceforge.net/)\nCopyright (C) 2001-2015 Nagoya Institute of Technology\n 2001-2008 Tokyo Institute of Technology\nAll rights reserved.\n"

/* audio ----------------------------------------------------------- */

Expand Down
2 changes: 1 addition & 1 deletion src/lib/HTS_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/HTS_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down
4 changes: 2 additions & 2 deletions src/lib/HTS_gstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down Expand Up @@ -100,7 +100,7 @@ HTS_Boolean HTS_GStreamSet_create(HTS_GStreamSet * gss, HTS_PStreamSet * pss, si
for (i = 0; i < gss->nstream; i++) {
if (HTS_PStreamSet_is_msd(pss, i)) { /* for MSD */
for (j = 0, msd_frame = 0; j < gss->total_frame; j++)
if (HTS_PStreamSet_get_msd_flag(pss, i, j)) {
if (HTS_PStreamSet_get_msd_flag(pss, i, j) == TRUE) {
for (k = 0; k < gss->gstream[i].vector_length; k++)
gss->gstream[i].par[j][k] = HTS_PStreamSet_get_parameter(pss, i, msd_frame, k);
msd_frame++;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/HTS_hidden.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/HTS_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/HTS_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down
20 changes: 15 additions & 5 deletions src/lib/HTS_model.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down Expand Up @@ -894,7 +894,7 @@ HTS_Boolean HTS_ModelSet_load(HTS_ModelSet * ms, char **voices, size_t num_voice
{
size_t i, j, k, s, e;
HTS_Boolean error = FALSE;
HTS_File *fp;
HTS_File *fp = NULL;
char buff1[HTS_MAXBUFLEN];
char buff2[HTS_MAXBUFLEN];
size_t matched_size;
Expand Down Expand Up @@ -1067,7 +1067,10 @@ HTS_Boolean HTS_ModelSet_load(HTS_ModelSet * ms, char **voices, size_t num_voice
}
}
if (error != FALSE) {
HTS_fclose(fp);
if (fp != NULL) {
HTS_fclose(fp);
fp = NULL;
}
break;
}
/* reset STREAM options */
Expand Down Expand Up @@ -1183,7 +1186,10 @@ HTS_Boolean HTS_ModelSet_load(HTS_ModelSet * ms, char **voices, size_t num_voice
free(temp_option);
}
if (error != FALSE) {
HTS_fclose(fp);
if (fp != NULL) {
HTS_fclose(fp);
fp = NULL;
}
break;
}
/* reset POSITION */
Expand Down Expand Up @@ -1365,6 +1371,7 @@ HTS_Boolean HTS_ModelSet_load(HTS_ModelSet * ms, char **voices, size_t num_voice
HTS_fseek(fp, start_of_data, SEEK_SET);
}
}
HTS_Window_clear(&ms->window[j]); /* if windows were loaded already, release them */
if (HTS_Window_load(&ms->window[j], win_fp, num_windows[j]) != TRUE)
error = TRUE;
for (k = 0; k < num_windows[j]; k++)
Expand Down Expand Up @@ -1452,7 +1459,10 @@ HTS_Boolean HTS_ModelSet_load(HTS_ModelSet * ms, char **voices, size_t num_voice
free(temp_gv_tree[j]);
free(temp_gv_tree);
/* fclose */
HTS_fclose(fp);
if (fp != NULL) {
HTS_fclose(fp);
fp = NULL;
}
if (error != FALSE)
break;
}
Expand Down
29 changes: 17 additions & 12 deletions src/lib/HTS_pstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down Expand Up @@ -236,8 +236,10 @@ static void HTS_PStream_gv_parmgen(HTS_PStream * pst, size_t m)
if (obj < prev)
step *= STEPINC;
}
for (t = 0; t < pst->length; t++)
pst->par[t][m] += step * pst->sm.g[t];
for (t = 0; t < pst->length; t++) {
if (pst->gv_switch[t])
pst->par[t][m] += step * pst->sm.g[t];
}
prev = obj;
}
}
Expand Down Expand Up @@ -292,22 +294,25 @@ HTS_Boolean HTS_PStreamSet_create(HTS_PStreamSet * pss, HTS_SStreamSet * sss, do
/* create */
for (i = 0; i < pss->nstream; i++) {
pst = &pss->pstream[i];
if (HTS_SStreamSet_is_msd(sss, i)) { /* for MSD */
if (HTS_SStreamSet_is_msd(sss, i) == TRUE) { /* for MSD */
pst->length = 0;
for (state = 0; state < HTS_SStreamSet_get_total_state(sss); state++)
if (HTS_SStreamSet_get_msd(sss, i, state) > msd_threshold[i])
pst->length += HTS_SStreamSet_get_duration(sss, state);
pst->msd_flag = (HTS_Boolean *) HTS_calloc(pss->total_frame, sizeof(HTS_Boolean));
for (state = 0, frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++)
if (HTS_SStreamSet_get_msd(sss, i, state) > msd_threshold[i])
for (state = 0, frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++) {
if (HTS_SStreamSet_get_msd(sss, i, state) > msd_threshold[i]) {
for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++) {
pst->msd_flag[frame] = TRUE;
frame++;
} else
}
} else {
for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++) {
pst->msd_flag[frame] = FALSE;
frame++;
}
}
}
} else { /* for non MSD */
pst->length = pss->total_frame;
pst->msd_flag = NULL;
Expand Down Expand Up @@ -349,10 +354,10 @@ HTS_Boolean HTS_PStreamSet_create(HTS_PStreamSet * pss, HTS_SStreamSet * sss, do
pst->gv_vari[j] = HTS_SStreamSet_get_gv_vari(sss, i, j);
}
pst->gv_switch = (HTS_Boolean *) HTS_calloc(pst->length, sizeof(HTS_Boolean));
if (HTS_SStreamSet_is_msd(sss, i)) { /* for MSD */
if (HTS_SStreamSet_is_msd(sss, i) == TRUE) { /* for MSD */
for (state = 0, frame = 0, msd_frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++)
for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++, frame++)
if (pst->msd_flag[frame])
if (pst->msd_flag[frame] == TRUE)
pst->gv_switch[msd_frame++] = HTS_SStreamSet_get_gv_switch(sss, i, state);
} else { /* for non MSD */
for (state = 0, frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++)
Expand All @@ -369,15 +374,15 @@ HTS_Boolean HTS_PStreamSet_create(HTS_PStreamSet * pss, HTS_SStreamSet * sss, do
pst->gv_vari = NULL;
}
/* copy pdfs */
if (HTS_SStreamSet_is_msd(sss, i)) { /* for MSD */
if (HTS_SStreamSet_is_msd(sss, i) == TRUE) { /* for MSD */
for (state = 0, frame = 0, msd_frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++) {
for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++) {
if (pst->msd_flag[frame]) {
if (pst->msd_flag[frame] == TRUE) {
/* check current frame is MSD boundary or not */
for (k = 0; k < pst->win_size; k++) {
not_bound = TRUE;
for (shift = pst->win_l_width[k]; shift <= pst->win_r_width[k]; shift++)
if ((int) frame + shift < 0 || (int) pss->total_frame <= (int) frame + shift || !pst->msd_flag[frame + shift]) {
if ((int) frame + shift < 0 || (int) pss->total_frame <= (int) frame + shift || pst->msd_flag[frame + shift] != TRUE) {
not_bound = FALSE;
break;
}
Expand Down
5 changes: 4 additions & 1 deletion src/lib/HTS_sstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down Expand Up @@ -181,6 +181,9 @@ HTS_Boolean HTS_SStreamSet_create(HTS_SStreamSet * sss, HTS_ModelSet * ms, HTS_L
size_t next_time;
size_t next_state;

if (HTS_Label_get_size(label) == 0)
return FALSE;

/* check interpolation weights */
for (i = 0, temp = 0.0; i < HTS_ModelSet_get_nvoices(ms); i++)
temp += duration_iw[i];
Expand Down
2 changes: 1 addition & 1 deletion src/lib/HTS_vocoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2001-2014 Nagoya Institute of Technology */
/* Copyright (c) 2001-2015 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2001-2008 Tokyo Institute of Technology */
Expand Down