Corner cases are handled by discarding a number of frames from the beginning and the end of each sentence that is equal to the number of the prev/next frames we need for the phones (lines 171-174). This wat, if `n_prev_phones` and `n_next_phones` are both 1 (for example), the first and last acoustic frame will not be considered as examples, but used solely for providing prev/next phone information; this way, all acoustic frames used as examples have a previous and a next frame.

Note that this approach is perfectly fine for TIMIT because we are assured that all sentences start and finish with a good amount of silence, which means only silent frames are dropped.