diff options
author | Tuomas Tuononen <tuomas.tuononen@code-q.fi> | 2015-10-01 10:22:35 +0300 |
---|---|---|
committer | Tuomas Tuononen <tuomas.tuononen@code-q.fi> | 2015-10-14 08:12:12 +0000 |
commit | 8a1f71de1f3ac57d0ece5a92167a4150b1c8ff63 (patch) | |
tree | c8954971837fd748f95b37aae99e598edee6bcd0 | |
parent | 6e8b1e5628d4ece453a26e2984e78763f596be3a (diff) |
PocketSphinx: Fix recognition with file input
File data was never read if recognition was started with mute on.
Change-Id: I7686f04058380172eb5ee29a5a8ebf0c4b26632b
Reviewed-by: Jeremy Whiting <jpwhiting@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
-rwxr-xr-x | src/plugins/asr/pocketsphinx/qspeechrecognitionengine_pocketsphinx.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/asr/pocketsphinx/qspeechrecognitionengine_pocketsphinx.cpp b/src/plugins/asr/pocketsphinx/qspeechrecognitionengine_pocketsphinx.cpp index 8afb937..a0eca83 100755 --- a/src/plugins/asr/pocketsphinx/qspeechrecognitionengine_pocketsphinx.cpp +++ b/src/plugins/asr/pocketsphinx/qspeechrecognitionengine_pocketsphinx.cpp @@ -364,6 +364,10 @@ void QSpeechRecognitionEnginePocketSphinx::unmute(qint64 timestamp) m_audioBuffer->setFifoLimit(m_audioBufferLimit); ps_start_utt(m_decoder); m_muted = false; + // Immediately check if audio is available. + // For file input this is mandatory, as onAudioDecoderBufferReady() has + // probably been already called (and ignored). + emit requestProcess(); } } |