Skip to content

Commit

Permalink
Several fixes from porting patches forward
Browse files Browse the repository at this point in the history
  • Loading branch information
zeehio committed Jun 6, 2018
1 parent fa8facd commit 7e28337
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion festival/src/modules/MultiSyn/EST_HybridTargetCost.cc
Expand Up @@ -46,7 +46,7 @@
#include "EST_HybridTargetCost.h"
#include "EST_FMatrix.h"
#include "ling_class/EST_Item.h"

using namespace std;

static float kl_divergence(EST_FVector *a, EST_FVector *b);

Expand Down
5 changes: 3 additions & 2 deletions festival/src/modules/UniSyn/us_prosody.cc
Expand Up @@ -190,13 +190,14 @@ void linear_pitchmarks(EST_Track &source_pm, EST_Track &target_pm,
float start_f0, float end_f0)
{
int i;
float m, length, pitch;
//float m;
float length, pitch;
target_pm.resize(source_pm.num_frames(), source_pm.num_channels());

length = (float)source_pm.num_frames() / (end_f0 - start_f0);

target_pm.t(0) = 0.0;
m = (end_f0 - start_f0) / length;
//m = (end_f0 - start_f0) / length;

for(i = 1; i < target_pm.num_frames(); ++i)
{
Expand Down
2 changes: 1 addition & 1 deletion festival/src/modules/UniSyn/us_unit.cc
Expand Up @@ -438,7 +438,7 @@ void concatenate_unit_coefs(EST_Relation &unit_stream, EST_Track &source_lpc)
int num_source_frames = 0;
int num_source_channels = 0;;
float prev_time, abs_offset, rel_offset, period, offset;
int i, j, k;
int i, j, k, l;
EST_Track *coefs;

EST_Item *u = unit_stream.head();
Expand Down
6 changes: 2 additions & 4 deletions speech_tools/grammar/ngram/ngrammar_io.cc
Expand Up @@ -77,8 +77,6 @@ load_ngram_arpa(const EST_String filename, EST_Ngrammar &n, const EST_StrList &v
EST_TokenStream ts;
EST_String s;
int i,j,k, order=0;
//double weight;
/*double occur;*/
int this_num,this_order;

if (ts.open(filename) == -1)
Expand Down Expand Up @@ -181,13 +179,13 @@ load_ngram_arpa(const EST_String filename, EST_Ngrammar &n, const EST_StrList &v
cerr << "ooooooooops" << endl;
return wrong_format;

occur = atof(ts.get().string());
double occur = atof(ts.get().string());
n.accumulate(window,occur);

// backoff weight ?
if (!ts.eoln())
{
weight = atof(ts.get().string());
double weight = atof(ts.get().string());
n.set_backoff_weight(window,weight);
}

Expand Down
2 changes: 1 addition & 1 deletion speech_tools/include/EST_TMatrix.h
Expand Up @@ -312,7 +312,7 @@ class EST_TMatrix : public EST_TVector<T>
for (i = 0; i < a.num_rows(); ++i) {
for (j = 0; j < a.num_columns(); ++j)
st << a.a_no_check(i, j) << " ";
st << endl;
st << std::endl;
}
return st;
}
Expand Down
1 change: 0 additions & 1 deletion speech_tools/ling_class/EST_Relation_mls.cc
Expand Up @@ -76,7 +76,6 @@ void add_link(EST_Item *from, EST_Item *to)
d->append_daughter()->append_daughter(to);
// Also add it to the simple list of the relation so traversal works
// append q
(void) q;
}

#if 0
Expand Down

0 comments on commit 7e28337

Please sign in to comment.