Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/aalto-speech/AaltoASR in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
senarvi committed Jan 15, 2014
2 parents 377a58f + 8d6eb37 commit a73c320
Show file tree
Hide file tree
Showing 15 changed files with 1,391 additions and 1,417 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENDIF(UNIX AND NOT WIN32)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

ADD_DEFINITIONS(-std=gnu++0x)

include(ExternalProject)
ExternalProject_Add(lapackpp_ext
PREFIX ${CMAKE_BINARY_DIR}/vendor/lapackpp
Expand Down
2 changes: 1 addition & 1 deletion aku/Distributions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,7 @@ Mixture::estimate_parameters(EstimationMode mode)
// m_weights[i] /= norm;

// Heuristics: If outside permitted region, move halfway
if (!isnan(sol1))
if (!std::isnan(sol1))
{
if (sol1 <= 0)
m_weights[i] = m_weights[i]/2.0;
Expand Down
5 changes: 4 additions & 1 deletion decoder/src/Search.hh
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ public:
void set_global_beam(float beam) { m_global_beam = beam; }
void set_verbose(int verbose) { m_verbose = verbose; }
void set_print_probs(bool print_probs) { m_print_probs = print_probs; }
void set_print_indices(bool print_indices) { m_print_indices = print_indices; }
void set_print_indices(bool print_indices)
{
m_print_indices = print_indices;
}
void set_print_frames(bool print_frames) { m_print_frames = print_frames; }
void set_word_boundary(const std::string &word);
void set_dummy_word_boundaries(bool value) { m_dummy_word_boundaries = value; }
Expand Down
33 changes: 16 additions & 17 deletions decoder/src/Toolbox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ Toolbox::reinitialize_search() {
}
m_lna_reader = new LnaReaderCircular;


if (m_tp_lexicon) {
delete m_tp_lexicon;
}
Expand All @@ -187,25 +186,25 @@ Toolbox::reinitialize_search() {
m_tp_search = new TokenPassSearch(*m_tp_lexicon, *m_tp_vocabulary, m_lna_reader);

if (m_use_stack_decoder) {
if (m_expander) {
delete m_expander;
}
m_expander = new Expander(*m_hmms, *m_lna_reader);
m_expander->set_post_durations(true);
m_expander->set_lexicon(m_lexicon);
if (m_expander) {
delete m_expander;
}
m_expander = new Expander(*m_hmms, *m_lna_reader);
m_expander->set_post_durations(true);
m_expander->set_lexicon(m_lexicon);

if (m_lexicon_reader) {
delete m_lexicon_reader;
}
m_lexicon_reader = new NowayLexiconReader(*m_hmm_map, *m_hmms);
if (m_lexicon_reader) {
delete m_lexicon_reader;
}
m_lexicon_reader = new NowayLexiconReader(*m_hmm_map, *m_hmms);

m_lexicon = &(m_lexicon_reader->lexicon());
m_vocabulary = &(m_lexicon_reader->vocabulary());
m_lexicon = &(m_lexicon_reader->lexicon());
m_vocabulary = &(m_lexicon_reader->vocabulary());

if (m_search) {
delete m_search;
}
m_search = new Search(*m_expander, *m_vocabulary);
if (m_search) {
delete m_search;
}
m_search = new Search(*m_expander, *m_vocabulary);
}
}

Expand Down
20 changes: 12 additions & 8 deletions decoder/src/Toolbox.hh
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,21 @@ public:
void set_print_text_result(int print) { m_tp_search->set_print_text_result(print); }
void set_print_state_segmentation(int print) { m_tp_search->set_print_state_segmentation(print); }
void set_keep_state_segmentation(int value) { m_tp_search->set_keep_state_segmentation(value); }
void set_print_probs(bool print_probs)
{
void set_print_probs(bool print_probs)
{
m_use_stack_decoder?m_search->set_print_probs(print_probs):m_tp_search->set_print_probs(print_probs);
}
void set_multiple_endings(int multiple_endings)
void set_multiple_endings(int multiple_endings)
{ m_search->set_multiple_endings(multiple_endings); }
void set_print_indices(bool print_indices)
{ m_search->set_print_indices(print_indices); }
void set_print_frames(bool print_frames)
{
m_search->set_print_frames(print_frames);

void set_print_indices(bool print_indices)
{
if (m_use_stack_decoder) m_search->set_print_indices(print_indices);
}

void set_print_frames(bool print_frames)
{
if (m_use_stack_decoder) m_search->set_print_frames(print_frames);
}

/// \brief Sets the word that represents word boundary.
Expand Down
Loading

0 comments on commit a73c320

Please sign in to comment.