@@ -520,38 +520,6 @@ async def get_sessions_with_speech(self, user_id: str, limit: int = 100):
520520
521521 return await cursor .to_list (length = None )
522522
523- async def update_transcription_status (
524- self , audio_uuid : str , status : str , error_message : str = None , provider : str = None
525- ):
526- """Update transcription status and completion timestamp.
527-
528- Args:
529- audio_uuid: UUID of the audio chunk
530- status: New status ('PENDING', 'PROCESSING', 'COMPLETED', 'FAILED', 'EMPTY')
531- error_message: Optional error message if status is 'FAILED'
532- provider: Optional provider name for successful transcriptions
533- """
534- update_doc = {
535- "transcription_status" : status ,
536- "updated_at" : datetime .now (UTC ).isoformat ()
537- }
538-
539- if status == "COMPLETED" :
540- update_doc ["transcription_completed_at" ] = datetime .now (UTC ).isoformat ()
541- if provider :
542- update_doc ["transcription_provider" ] = provider
543- elif status == "FAILED" and error_message :
544- update_doc ["transcription_error" ] = error_message
545- elif status == "EMPTY" :
546- update_doc ["transcription_completed_at" ] = datetime .now (UTC ).isoformat ()
547- if provider :
548- update_doc ["transcription_provider" ] = provider
549-
550- result = await self .col .update_one (
551- {"audio_uuid" : audio_uuid }, {"$set" : update_doc }
552- )
553- return result .modified_count > 0
554-
555523
556524class ConversationsRepository :
557525 """Repository for user-facing conversations (speech-driven architecture)."""
0 commit comments