Spaces:
Running
Running
Commit
·
be6b69c
1
Parent(s):
c816b75
Update transcribe job
Browse files
app/jobs/transcribe_job.py
CHANGED
|
@@ -32,8 +32,13 @@ def transcribe_job(audio_url: str, note_id: str, user_id: str | None = None):
|
|
| 32 |
chunks = transcribe_file_chunks(model, wav_path, 30.0, 5.0)
|
| 33 |
|
| 34 |
chunks = [
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
]
|
| 38 |
|
| 39 |
note_status = "transcribed" if chunks else "error"
|
|
|
|
| 32 |
chunks = transcribe_file_chunks(model, wav_path, 30.0, 5.0)
|
| 33 |
|
| 34 |
chunks = [
|
| 35 |
+
{
|
| 36 |
+
"text": c["text"],
|
| 37 |
+
"start": c.get("start"),
|
| 38 |
+
"end": c.get("end"),
|
| 39 |
+
}
|
| 40 |
+
for c in chunks
|
| 41 |
+
if c.get("text", "").strip()
|
| 42 |
]
|
| 43 |
|
| 44 |
note_status = "transcribed" if chunks else "error"
|