norhan12 commited on
Commit
05245a6
·
verified ·
1 Parent(s): 09d6b72

Update process_interview.py

Browse files
Files changed (1) hide show
  1. process_interview.py +2 -1
process_interview.py CHANGED
@@ -202,6 +202,7 @@ def transcribe(audio_path: str) -> Dict:
202
  raise Exception(f"لم يتم الحصول على رابط الملف: {upload_response.json()}")
203
 
204
  # 2. بدء التحويل (Transcription)
 
205
  transcript_response = requests.post(
206
  "https://api.assemblyai.com/v2/transcript",
207
  headers={"authorization": ASSEMBLYAI_KEY},
@@ -209,7 +210,7 @@ def transcribe(audio_path: str) -> Dict:
209
  "audio_url": audio_url,
210
  "speaker_labels": True,
211
  "filter_profanity": True,
212
- "speech_model": "universal" # أو جربي "universal-2" إذا لم يعمل هذا
213
  }
214
  )
215
 
 
202
  raise Exception(f"لم يتم الحصول على رابط الملف: {upload_response.json()}")
203
 
204
  # 2. بدء التحويل (Transcription)
205
+ # --- بدء التحويل (Transcription) بالتنسيق الجديد ---
206
  transcript_response = requests.post(
207
  "https://api.assemblyai.com/v2/transcript",
208
  headers={"authorization": ASSEMBLYAI_KEY},
 
210
  "audio_url": audio_url,
211
  "speaker_labels": True,
212
  "filter_profanity": True,
213
+ "speech_models": ["universal-2"] # لاحظي: speech_models (جمع) وقيمة داخل قائمة []
214
  }
215
  )
216