feat: working frontend AI transcribe
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -583,3 +583,20 @@ def api_post_audit(post_id: int):
|
||||
return jsonify({"logs": list_audit_logs(post_id=post_id, page=page, limit=limit)})
|
||||
except Exception as e:
|
||||
return _error(str(e), 500)
|
||||
|
||||
@api.get("/posts/<int:post_id>/audio")
|
||||
def api_get_audio_url(post_id: int):
|
||||
"""
|
||||
Get a signed URL for the original audio file.
|
||||
"""
|
||||
expires_in = request.args.get("expires_in", default=3600, type=int)
|
||||
|
||||
try:
|
||||
audio_data = get_original_audio_url(post_id, expires_in=expires_in)
|
||||
return jsonify(audio_data)
|
||||
except ValueError as e:
|
||||
return _error(str(e), 404)
|
||||
except RuntimeError as e:
|
||||
return _error(str(e), 500)
|
||||
except Exception as e:
|
||||
return _error(f"Failed to get audio URL: {e}", 500)
|
||||
|
||||
BIN
backend/uploads/15e03d49-14bd-42dd-bb7f-2e28e930c361_data.m4a
Normal file
BIN
backend/uploads/15e03d49-14bd-42dd-bb7f-2e28e930c361_data.m4a
Normal file
Binary file not shown.
BIN
backend/uploads/21dc3b26-0b05-4669-a86a-053f0b441f59_data.m4a
Normal file
BIN
backend/uploads/21dc3b26-0b05-4669-a86a-053f0b441f59_data.m4a
Normal file
Binary file not shown.
BIN
backend/uploads/2bbc9bd6-7895-4cd1-8040-c2e886f4e901_data.m4a
Normal file
BIN
backend/uploads/2bbc9bd6-7895-4cd1-8040-c2e886f4e901_data.m4a
Normal file
Binary file not shown.
BIN
backend/uploads/dd79bca3-9b6d-4fc5-ab24-cbf09b4930a6_data.m4a
Normal file
BIN
backend/uploads/dd79bca3-9b6d-4fc5-ab24-cbf09b4930a6_data.m4a
Normal file
Binary file not shown.
Reference in New Issue
Block a user