Implement Call Recording for STT and Replay #3
@@ -251,7 +251,7 @@ async def mqtt_lifecycle_manager():
|
|||||||
try:
|
try:
|
||||||
with open(local_path, "rb") as f:
|
with open(local_path, "rb") as f:
|
||||||
files = {"file": (f"{call_id}.mp3", f, "audio/mpeg")}
|
files = {"file": (f"{call_id}.mp3", f, "audio/mpeg")}
|
||||||
response = requests.post(f"{MQTT_BROKER}/upload", files=files, data={"node_id": NODE_ID, "call_id": call_id}, timeout=30)
|
response = requests.post(f"http://{MQTT_BROKER}/upload", files=files, data={"node_id": NODE_ID, "call_id": call_id}, timeout=30)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
return response.json().get("url")
|
return response.json().get("url")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user