Business event tracing completed for both eveai_workers tasks and eveai_chat_workers tasks
This commit is contained in:
@@ -7,6 +7,7 @@ from common.extensions import minio_client
|
||||
import subprocess
|
||||
|
||||
from .transcription_processor import TranscriptionProcessor
|
||||
from common.utils.business_event_context import current_event
|
||||
|
||||
|
||||
class AudioProcessor(TranscriptionProcessor):
|
||||
@@ -24,8 +25,13 @@ class AudioProcessor(TranscriptionProcessor):
|
||||
self.document_version.id,
|
||||
self.document_version.file_name
|
||||
)
|
||||
compressed_audio = self._compress_audio(file_data)
|
||||
return self._transcribe_audio(compressed_audio)
|
||||
|
||||
with current_event.create_span("Audio Processing"):
|
||||
compressed_audio = self._compress_audio(file_data)
|
||||
with current_event.create_span("Transcription Generation"):
|
||||
transcription = self._transcribe_audio(compressed_audio)
|
||||
|
||||
return transcription
|
||||
|
||||
def _compress_audio(self, audio_data):
|
||||
self._log("Compressing audio")
|
||||
|
||||
Reference in New Issue
Block a user