Conversation
mpariente
left a comment
There was a problem hiding this comment.
Thanks a lot for the PR !
The logic looks good, can you check the two comments please? And add a unit test that makes sure the exception is raised?
| 'frames. At least {} seconds are required, ' | ||
| 'but only {} were found. ' | ||
| 'Returning 1e-5. Please check you wav files' | ||
| .format(((N - 1) * N_FRAME + NFFT) / FS, x.shape[0] / FS), |
There was a problem hiding this comment.
This seems unrelated. It's after removing silent frames, so the minimum audio cannot be known a priori.
There was a problem hiding this comment.
It means "The size after silent frames removal", I though it was implied by the previous sentence in the comment.
|
|
||
| if min(x.shape[0], y.shape[0]) < N_FRAME: | ||
| raise Exception('x and y should at least {} miliseconds long' | ||
| .format(int(1000 * float(N_FRAME) / float(FS)))) |
There was a problem hiding this comment.
Did you take into account the overlap-add in this calculation?
There was a problem hiding this comment.
This is the bound on the input size for the silence removal.
Thinking about it, I think it is actually included in the other check after the removal.
No description provided.