Spaces:
Running
Running
Commit
·
75ad4a0
1
Parent(s):
2916663
update
Browse files
app/jobs/transcribe_job.py
CHANGED
|
@@ -99,6 +99,14 @@ def transcribe_job(audio_url: str, note_id: str, user_id: str | None = None):
|
|
| 99 |
"generate": ["normalize", "keywords", "summary", "mindmap"],
|
| 100 |
}
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
generate_tasks = (
|
| 103 |
["normalize", "keywords", "summary", "mindmap"]
|
| 104 |
if note_status == "transcribed"
|
|
|
|
| 99 |
"generate": ["normalize", "keywords", "summary", "mindmap"],
|
| 100 |
}
|
| 101 |
|
| 102 |
+
# Persist the original audio URL into the note metadata so the
|
| 103 |
+
# Note Service has a stable reference to the uploaded audio.
|
| 104 |
+
if audio_url:
|
| 105 |
+
try:
|
| 106 |
+
payload["metadata"]["audio"]["url"] = audio_url
|
| 107 |
+
except Exception:
|
| 108 |
+
logging.exception("Failed to attach audio_url to payload for note %s", note_id)
|
| 109 |
+
|
| 110 |
generate_tasks = (
|
| 111 |
["normalize", "keywords", "summary", "mindmap"]
|
| 112 |
if note_status == "transcribed"
|