Commit 1e09cea
committed
inference/tts: fix speedup calculation
VitsTts returns duration in seconds, but our speedup divides by elapsed
time in milliseconds, causing the speedup to be 1000x too low. We could
divide by the elapsed time in seconds to fix this, but that would not be
very precise, and as VitsTts could return 0 for very short audio, we
could return speedup 0. Instead, calculate the duration in milliseconds
from samples and sample rate, and use that to calculate speedup.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>1 parent 1ea4304 commit 1e09cea
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | | - | |
61 | | - | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
0 commit comments