uploaded = files.upload()
todo = []
for fn in uploaded.keys():
print('{name} with length {length} bytes'.format(name=fn, length=len(uploaded[fn])))
todo.append(fn)todo
# 輸出格式為srt
# 輸出路徑為目前位置
w = get_writer('srt', '.')for f in todo:
name = os.path.basename(f) result = model.transcribe(name) srt_file_name = '{name}.srt'.format(name=name)
w(result, srt_file_name) files.download(srt_file_name)