Implement Call Recording for STT and Replay #3

Merged
logan merged 11 commits from implement-call-recording into main 2026-01-03 19:38:05 -05:00
Showing only changes of commit 051eac88b0 - Show all commits

View File

@@ -327,7 +327,8 @@ async def mqtt_lifecycle_manager():
"timestamp": now.isoformat(), "timestamp": now.isoformat(),
"event": "call_end", "event": "call_end",
"metadata": last_metadata, "metadata": last_metadata,
"audio_url": audio_url "audio_url": audio_url,
"call_id": current_call_id
} }
client.publish(f"nodes/{NODE_ID}/metadata", json.dumps(payload), qos=0) client.publish(f"nodes/{NODE_ID}/metadata", json.dumps(payload), qos=0)
@@ -352,7 +353,13 @@ async def mqtt_lifecycle_manager():
except Exception as e: except Exception as e:
LOGGER.error(f"Failed to start recorder: {e}") LOGGER.error(f"Failed to start recorder: {e}")
payload = {"node_id": NODE_ID, "timestamp": now.isoformat(), "event": "call_start", "metadata": current_meta} payload = {
"node_id": NODE_ID,
"timestamp": now.isoformat(),
"event": "call_start",
"metadata": current_meta,
"call_id": current_call_id
}
client.publish(f"nodes/{NODE_ID}/metadata", json.dumps(payload), qos=0) client.publish(f"nodes/{NODE_ID}/metadata", json.dumps(payload), qos=0)
last_tgid = current_tgid last_tgid = current_tgid
last_metadata = current_meta last_metadata = current_meta
@@ -374,7 +381,8 @@ async def mqtt_lifecycle_manager():
"timestamp": now.isoformat(), "timestamp": now.isoformat(),
"event": "call_end", "event": "call_end",
"metadata": last_metadata, "metadata": last_metadata,
"audio_url": audio_url "audio_url": audio_url,
"call_id": current_call_id
} }
client.publish(f"nodes/{NODE_ID}/metadata", json.dumps(payload), qos=0) client.publish(f"nodes/{NODE_ID}/metadata", json.dumps(payload), qos=0)
last_tgid = 0 last_tgid = 0