saurabhshri / CCAligner

🔮 Word by word audio subtitle synchronisation tool and API. Developed under GSoC 2017 with CCExtractor.
165 stars 34 forks source link

resolve issue 27 #71

Closed rkoo19 closed 6 years ago

rkoo19 commented 6 years ago

I tried to resolve issue 27, which is on Google Code-in.

codecov[bot] commented 6 years ago

Codecov Report

Merging #71 into master will decrease coverage by 0.04%. The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
- Coverage    42.4%   42.36%   -0.05%     
==========================================
  Files          27       27              
  Lines        3469     3477       +8     
==========================================
+ Hits         1471     1473       +2     
- Misses       1998     2004       +6
Impacted Files Coverage Δ
src/lib_ccaligner/recognize_using_pocketsphinx.cpp 36.5% <25%> (-0.25%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1305480...9cf3ddb. Read the comment docs.

saurabhshri commented 6 years ago

We should not try to evaluate samples that do not exist.

So, if a subtitle frame has a timestamp that tries to read samples outside the existence, we should not process them, and just return with warning of what happened with the alignment till that point.

In case the starting timestamp is well within the sample range, but ending timestamp is outside sample range, then we should only evaluate till the samples exist and return the alignment till that point.