Spaces:
Sleeping
Sleeping
Commit ·
c871931
1
Parent(s): 0e8b4d0
cleaned transcript script
Browse files
src/preprocessing/transcript_generator.py
CHANGED
|
@@ -150,18 +150,10 @@ class TranscriptGenerator:
|
|
| 150 |
file_written = os.path.exists(output_text_file) and os.path.getsize(output_text_file) > 100 # >100 bytes means not just header
|
| 151 |
|
| 152 |
if not all_words:
|
| 153 |
-
print("
|
| 154 |
if file_written:
|
| 155 |
-
print(f"
|
| 156 |
else:
|
| 157 |
-
print(f"
|
| 158 |
|
| 159 |
return file_written
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
# if __name__ == "__main__":
|
| 163 |
-
# tg = TranscriptGenerator()
|
| 164 |
-
# audio_path = r"../../audios/Conditional Formatting for Automation Friday_ 1 December_ 2023 at 11_58_47 AM_2522_SV.wav"
|
| 165 |
-
# print("Looking for:", os.path.abspath(audio_path))
|
| 166 |
-
# success = tg.transcribe_audio(audio_path, "output_transcript.tsv")
|
| 167 |
-
# print("✅ Transcription complete!" if success else "❌ No transcription produced.")
|
|
|
|
| 150 |
file_written = os.path.exists(output_text_file) and os.path.getsize(output_text_file) > 100 # >100 bytes means not just header
|
| 151 |
|
| 152 |
if not all_words:
|
| 153 |
+
print(" No words recognized by the model.")
|
| 154 |
if file_written:
|
| 155 |
+
print(f" Transcript saved to {output_text_file}")
|
| 156 |
else:
|
| 157 |
+
print(f" Transcript file is empty or only contains header: {output_text_file}")
|
| 158 |
|
| 159 |
return file_written
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|