bichnhan2701 commited on
Commit
1fa646f
·
1 Parent(s): cc65c05

Fix bug early enrich

Browse files
Files changed (1) hide show
  1. app/api/transcribe.py +15 -15
app/api/transcribe.py CHANGED
@@ -110,6 +110,8 @@ async def _run_sync_pipeline(tmp_wav: str, note_id: str):
110
  "asr_model": "PhoWhisper-base",
111
  }
112
  },
 
 
113
  },
114
  )
115
 
@@ -126,22 +128,20 @@ async def _create_placeholder_note(note_id: str, duration: float):
126
  - SSE không trả not_found
127
  - enrich có object để update
128
  """
129
- await NoteServiceClient().create_audio_note(
130
- {
131
- "note_id": note_id,
132
- "type": "audio",
133
- "status": "processing",
134
- "raw_text": "",
135
- "metadata": {
136
- "audio": {
137
- "duration": duration,
138
- "chunks": [],
139
- "asr_model": "PhoWhisper-base",
140
- }
141
- },
142
- "generate": ["normalize", "keywords", "summary", "mindmap"],
143
  }
144
- )
 
 
145
 
146
 
147
  # ============================================================
 
110
  "asr_model": "PhoWhisper-base",
111
  }
112
  },
113
+ # 🔥 THÊM DÒNG NÀY
114
+ "generate": ["normalize", "keywords", "summary", "mindmap"],
115
  },
116
  )
117
 
 
128
  - SSE không trả not_found
129
  - enrich có object để update
130
  """
131
+ await NoteServiceClient().create_audio_note({
132
+ "note_id": note_id,
133
+ "type": "audio",
134
+ "status": "processing",
135
+ "raw_text": "",
136
+ "metadata": {
137
+ "audio": {
138
+ "duration": duration,
139
+ "chunks": [],
140
+ "asr_model": "PhoWhisper-base",
 
 
 
 
141
  }
142
+ },
143
+ # 🔥 KHÔNG generate ở đây
144
+ })
145
 
146
 
147
  # ============================================================