Spaces:
Build error
Build error
Update chunkedTranscriber.py
Browse files- chunkedTranscriber.py +0 -3
chunkedTranscriber.py
CHANGED
|
@@ -241,7 +241,6 @@ class ChunkedTranscriber:
|
|
| 241 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 242 |
|
| 243 |
try:
|
| 244 |
-
print(f"\n\n Chunk shape: {chunk_data['chunk'].shape}")
|
| 245 |
# Language detection
|
| 246 |
lid_processor, lid_model = self.load_lid_mms()
|
| 247 |
lid_lang = self.language_identification(lid_model, lid_processor, chunk_data['chunk'])
|
|
@@ -346,7 +345,6 @@ class ChunkedTranscriber:
|
|
| 346 |
'end_time': turn.end,
|
| 347 |
'speaker': speaker
|
| 348 |
})
|
| 349 |
-
# print(f"\n\n Speaker Segments:\n{speaker_segments}\n")
|
| 350 |
|
| 351 |
audio = self.load_audio(audio_path)
|
| 352 |
chunks = self.preprocess_audio(audio)
|
|
@@ -366,7 +364,6 @@ class ChunkedTranscriber:
|
|
| 366 |
translation_model,
|
| 367 |
translation_tokenizer
|
| 368 |
)
|
| 369 |
-
print(f"\n\nResult:\n{result}")
|
| 370 |
if result:
|
| 371 |
for segment in speaker_segments:
|
| 372 |
if int(segment['start_time']) <= int(chunk_data['start_time']) < int(segment['end_time']):
|
|
|
|
| 241 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 242 |
|
| 243 |
try:
|
|
|
|
| 244 |
# Language detection
|
| 245 |
lid_processor, lid_model = self.load_lid_mms()
|
| 246 |
lid_lang = self.language_identification(lid_model, lid_processor, chunk_data['chunk'])
|
|
|
|
| 345 |
'end_time': turn.end,
|
| 346 |
'speaker': speaker
|
| 347 |
})
|
|
|
|
| 348 |
|
| 349 |
audio = self.load_audio(audio_path)
|
| 350 |
chunks = self.preprocess_audio(audio)
|
|
|
|
| 364 |
translation_model,
|
| 365 |
translation_tokenizer
|
| 366 |
)
|
|
|
|
| 367 |
if result:
|
| 368 |
for segment in speaker_segments:
|
| 369 |
if int(segment['start_time']) <= int(chunk_data['start_time']) < int(segment['end_time']):
|