setup logging
from pathlib import Path
+import sys
from typing import List, Tuple
from elpis.engines.common.input.resample import resample
from elpis.engines.common.objects.transcription import Transcription as BaseTranscription
@@ -23,6 +24,11 @@ class HFTransformersTranscription(BaseTranscription):
self.elan_path = self.path / "transcription.eaf"
self.model: HFTransformersModel
+ # Setup logging
+ run_log_path = self.path.joinpath('train.log')
+ sys.stdout = open(run_log_path, 'w')
+ sys.stderr = sys.stdout
+
def transcribe(self, on_complete: callable=None) -> None:
self.status = "transcribing"
processor, model = self._get_wav2vec2_requirements()
