mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-12 03:37:03 +00:00
✨(backend) add metadata collection of VAD, connection and chat events
Introduce MetadataCollector and MetadataCollectorService classes to centralize the collection and storage of user connections, VAD events, and chat messages. This creates a structured foundation for future speaker assignment logic based on voice activity detection. Add tests for this new feature.
This commit is contained in:
@@ -45,6 +45,10 @@ from core.recording.event.exceptions import (
|
||||
)
|
||||
from core.recording.event.notification import notification_service
|
||||
from core.recording.event.parsers import get_parser
|
||||
from core.recording.services.metadata_collector import (
|
||||
MetadataCollectorException,
|
||||
MetadataCollectorService,
|
||||
)
|
||||
from core.recording.worker.exceptions import (
|
||||
RecordingStartError,
|
||||
RecordingStopError,
|
||||
@@ -338,6 +342,15 @@ class RoomViewSet(
|
||||
status=drf_status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
)
|
||||
|
||||
if settings.METADATA_COLLECTOR_ENABLED and (
|
||||
recording.mode == models.RecordingModeChoices.TRANSCRIPT
|
||||
or recording.options.get("transcribe", False)
|
||||
):
|
||||
try:
|
||||
MetadataCollectorService().start(recording)
|
||||
except MetadataCollectorException:
|
||||
logger.warning("Failed to start MetadataCollectorService")
|
||||
|
||||
return drf_response.Response(
|
||||
{"message": f"Recording successfully started for room {room.slug}"},
|
||||
status=drf_status.HTTP_201_CREATED,
|
||||
|
||||
Reference in New Issue
Block a user