From f5bde41eab44eadc887e437a72685e2291da0ddd Mon Sep 17 00:00:00 2001 From: rany Date: Wed, 9 Jun 2021 17:33:17 +0300 Subject: [PATCH] Fix subtitles and version bump --- setup.cfg | 2 +- src/edgeTTS/__init__.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index 67c5d65..0b988c4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/src/edgeTTS/__init__.py b/src/edgeTTS/__init__.py index 7be4126..73e4313 100755 --- a/src/edgeTTS/__init__.py +++ b/src/edgeTTS/__init__.py @@ -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.