final codebase rework

This commit is contained in:
Jaikinator
2023-08-24 16:12:28 +02:00
parent dc79fed6af
commit e331fe98f3
6 changed files with 128 additions and 17 deletions
+32 -2
View File
@@ -1,8 +1,38 @@
from autotranscript.autotranscript import AutoTranscribe
# import os
# import sys
# import traceback
# class TracePrints(object):
# def __init__(self):
# self.stdout = sys.stdout
# def write(self, s):
# self.stdout.write("Writing %r\n" % s)
# traceback.print_stack(file=self.stdout)
# sys.stdout = TracePrints()
# os.environ["PYANNOTE_CACHE"] = os.path.expanduser("~/PycharmProjects/autotranscript/autotranscript/models/pyannote")
# import os
# os.environ['TRANSFORMERS_CACHE'] = os.path.expanduser("~/PycharmProjects/autotranscript/autotranscript/models")
# os.environ['HF_HOME'] = os.path.expanduser("~/PycharmProjects/autotranscript/autotranscript/models")
from autotranscript import AutoTranscribe
model = AutoTranscribe()
text = model.transcribe("tests/test.wav")
text = model.transcribe("test.mp4")
print("Transcription:\n")
print(text)
# from autotranscript.misc import *
# import os
# print(os.path.exists(CACHE_DIR))
# print(os.path.exists(WHISPER_DEFAULT_PATH))
# print(os.path.exists(PYANNOTE_DEFAULT_PATH))
# print(os.path.exists(PYANNOTE_DEFAULT_CONFIG))