Skip to content

Commit

Permalink
Merge pull request #11 from untitledaiproject/ethan/skip-empty-transc…
Browse files Browse the repository at this point in the history
…ripts
  • Loading branch information
etown authored Feb 4, 2024
2 parents 742b237 + c15c4e6 commit d81bcd1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion untitledai/services/conversation/conversation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ async def process_conversation_from_audio(self, capture_file: CaptureFile, segme
transcription.transcription_time = time.time() - start_time # Transcription time
logger.info(f"Transcription complete in {transcription.transcription_time:.2f} seconds")
logger.info(f"Transcription: {transcription.utterances}")

if not transcription.utterances:
logger.info("No utterances found in the transcription. Skipping conversation processing.")
return None, None

# Conversation start and end time
conversation_start_time = segment_file.timestamp
conversation_end_time = conversation_start_time + timedelta(seconds=audio_duration)
Expand Down

0 comments on commit d81bcd1

Please sign in to comment.