tuanh123789 / AdaSpeech

An implementation of Microsoft's "AdaSpeech: Adaptive Text to Speech for Custom Voice"
95 stars 27 forks source link

why convert average mel to integer #2

Open mayfool opened 2 years ago

mayfool commented 2 years ago

https://github.com/tuanh123789/AdaSpeech/blob/64f15c4b3fa4590267f12930d7aaf411a1b36d1e/preprocessor/preprocessor.py#L336

mayfool commented 2 years ago

Thanks for implementing adaspeech, I'm confused why convert average mel to integer.

tuanh123789 commented 2 years ago

Thanks for implementing adaspeech, I'm confused why convert average mel to integer.

because the mel spectrogram frame is a matrix, if you want to slice it you have to convert float to int :D

mayfool commented 2 years ago

Thanks for implementing adaspeech, I'm confused why convert average mel to integer.

because the mel spectrogram frame is a matrix, if you want to slice it you have to convert float to int :D

I don't mean this.I mean why use "//" op here,this op converts average mel to integer.Maybe should use "mel[:, int(start):int(end)], axis=1)/np.array(end - start)" ?