Fix subtitles and version bump

This commit is contained in:
rany 2021-06-09 17:33:17 +03:00
parent 21eb9c934b
commit f5bde41eab
2 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[metadata]
name = edge-tts
version = 2.0.5
version = 2.0.6
author = rany
author_email = ranygh@riseup.net
description = Microsoft Edge's TTS

View File

@ -49,9 +49,8 @@ def removeIncompatibleControlChars(s):
def mktimestamp(ns):
hour = math.floor(ns / 10000 / 1000 / 3600)
minute = math.floor((ns / 10000 / 1000 / 60) % 60)
seconds = math.floor((ns / 10000 / 1000) % 60)
mili = float(str(math.modf((ns / 10000) - (1000 * seconds))[1])[:3])
return "%.02d:%.02d:%.02d.%.03d" % (hour, minute, seconds, mili)
seconds = (ns / 10000 / 1000) % 60
return "%.02d:%.02d:%06.3f" % (hour, minute, seconds)
# Return loaded JSON data of list of Edge's voices
# NOTE: It's not the total list of available voices.