mirror of
https://github.com/DanielSWolf/rhubarb-lip-sync.git
synced 2026-11-21 12:25:08 +00:00
Handling zero-length audio files
This commit is contained in:
@@ -288,6 +288,11 @@ Timeline<Phone> detectPhones(
|
||||
boost::optional<std::string> dialog,
|
||||
ProgressSink& progressSink)
|
||||
{
|
||||
// Pocketsphinx doesn't like empty input
|
||||
if (audioStream->getTruncatedRange().getLength() == centiseconds::zero()) {
|
||||
return Timeline<Phone>{};
|
||||
}
|
||||
|
||||
// Discard Pocketsphinx output
|
||||
err_set_logfp(nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user