From bbc933a821ed62926d2b612a87c552d99088e51c Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Tue, 17 May 2016 13:52:18 +0200 Subject: [PATCH] Temporarily removed --dialog option --- src/main.cpp | 2 -- src/phoneExtraction.cpp | 7 ++----- src/phoneExtraction.h | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 39c9e44..9621f45 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -88,7 +88,6 @@ int main(int argc, char *argv[]) { tclap::ValuesConstraint logLevelConstraint(logLevels); tclap::ValueArg logLevel("", "logLevel", "The minimum log level to log", false, logging::Level::Debug, &logLevelConstraint, cmd); tclap::ValueArg logFileName("", "logFile", "The log file path.", false, string(), "string", cmd); - tclap::ValueArg dialog("d", "dialog", "The text of the dialog.", false, string(), "string", cmd); auto exportFormats = vector(ExportFormatConverter::get().getValues()); tclap::ValuesConstraint exportFormatConstraint(exportFormats); tclap::ValueArg exportFormat("f", "exportFormat", "The export format.", false, ExportFormat::TSV, &exportFormatConstraint, cmd); @@ -118,7 +117,6 @@ int main(int argc, char *argv[]) { ProgressBar progressBar; phones = detectPhones( createAudioStream(inputFileName.getValue()), - dialog.isSet() ? dialog.getValue() : boost::optional(), progressBar); } std::cerr << "Done" << std::endl; diff --git a/src/phoneExtraction.cpp b/src/phoneExtraction.cpp index bbe3150..dab5ccb 100644 --- a/src/phoneExtraction.cpp +++ b/src/phoneExtraction.cpp @@ -292,7 +292,6 @@ BoundedTimeline getPhoneAlignment( BoundedTimeline detectPhones( unique_ptr audioStream, - boost::optional dialog, ProgressSink& progressSink) { // Pocketsphinx doesn't like empty input @@ -319,13 +318,11 @@ BoundedTimeline detectPhones( auto recognizer = createSpeechRecognizer(*config.get()); ProgressMerger progressMerger(progressSink); - ProgressSink& wordRecognitionProgressSink = progressMerger.addSink(dialog ? 0.0 : 1.0); + ProgressSink& wordRecognitionProgressSink = progressMerger.addSink(1.0); ProgressSink& alignmentProgressSink = progressMerger.addSink(0.5); // Get words - vector words = dialog - ? extractDialogWords(*dialog) - : recognizeWords(audioStream->clone(true), *recognizer.get(), wordRecognitionProgressSink); + vector words = recognizeWords(audioStream->clone(true), *recognizer.get(), wordRecognitionProgressSink); // Look up words in dictionary vector wordIds = getWordIds(words, *recognizer->dict); diff --git a/src/phoneExtraction.h b/src/phoneExtraction.h index 37f5cf9..871d62a 100644 --- a/src/phoneExtraction.h +++ b/src/phoneExtraction.h @@ -4,10 +4,8 @@ #include "audio/AudioStream.h" #include "Phone.h" #include "progressBar.h" -#include #include "BoundedTimeline.h" BoundedTimeline detectPhones( std::unique_ptr audioStream, - boost::optional dialog, ProgressSink& progressSink);