diff --git a/python/example/test_srt.py b/python/example/test_srt.py index 0a1747ff..0fe5643e 100755 --- a/python/example/test_srt.py +++ b/python/example/test_srt.py @@ -52,5 +52,6 @@ def transcribe(): end=datetime.timedelta(seconds=line[-1]['end'])) subs.append(s) return subs - -print (srt.compose(transcribe())) +subtitle = open('subtitle.srt', 'w', encoding="utf-8") +print ((srt.compose(transcribe())), file = subtitle) +subtitle.close()