Spaces:
Sleeping
Sleeping
akhfzl commited on
Commit ·
4babbcb
1
Parent(s): 60cbbcd
update-vn
Browse files
faceVerificationUtilization/__pycache__/utils.cpython-313.pyc
CHANGED
|
Binary files a/faceVerificationUtilization/__pycache__/utils.cpython-313.pyc and b/faceVerificationUtilization/__pycache__/utils.cpython-313.pyc differ
|
|
|
faceVerificationUtilization/utils.py
CHANGED
|
@@ -164,12 +164,15 @@ def UploadVoice(audio_file):
|
|
| 164 |
|
| 165 |
try:
|
| 166 |
with open(audio_file, "rb") as f:
|
| 167 |
-
|
| 168 |
-
|
|
|
|
|
|
|
|
|
|
| 169 |
|
| 170 |
if response.status_code != 200:
|
| 171 |
return f"❌ Gagal upload. Status: {response.status_code}", "", ""
|
| 172 |
-
|
| 173 |
try:
|
| 174 |
data = response.json()
|
| 175 |
except Exception:
|
|
|
|
| 164 |
|
| 165 |
try:
|
| 166 |
with open(audio_file, "rb") as f:
|
| 167 |
+
response = requests.post(
|
| 168 |
+
"https://n8n.smartid.co.id/webhook/voice-upload",
|
| 169 |
+
data=f,
|
| 170 |
+
headers={"Content-Type": "audio/wav"},
|
| 171 |
+
)
|
| 172 |
|
| 173 |
if response.status_code != 200:
|
| 174 |
return f"❌ Gagal upload. Status: {response.status_code}", "", ""
|
| 175 |
+
|
| 176 |
try:
|
| 177 |
data = response.json()
|
| 178 |
except Exception:
|