Spaces:
Running
Running
Update services/api.ts
Browse files- services/api.ts +4 -4
services/api.ts
CHANGED
|
@@ -16,7 +16,7 @@ const uploadAudioToOrchestrator = async (file: Blob | File, runId: string, suffi
|
|
| 16 |
formData.append('ext', ext);
|
| 17 |
formData.append('file', file);
|
| 18 |
|
| 19 |
-
const response = await fetch('https://opera8-
|
| 20 |
method: 'POST',
|
| 21 |
body: formData
|
| 22 |
});
|
|
@@ -40,7 +40,7 @@ export const uploadJob = async (
|
|
| 40 |
const vevoPayload = `VEVOCONFIG_userRunId_${currentRunId}_sourceExt_${sourceExt}_refExt_${refExt}_spaceUrl_${b64SpaceUrl}`;
|
| 41 |
|
| 42 |
// ۳. ارسال دستور کار به سیستم دیسپچ گیتهاب اکشنز ابری
|
| 43 |
-
const response = await fetch('https://opera8-
|
| 44 |
method: 'POST',
|
| 45 |
headers: { 'Content-Type': 'application/json' },
|
| 46 |
body: JSON.stringify({
|
|
@@ -82,7 +82,7 @@ export const uploadEnhancementJob = async (audioBlob: Blob): Promise<any> => {
|
|
| 82 |
formData.append('ext', ext);
|
| 83 |
formData.append('file', audioBlob);
|
| 84 |
|
| 85 |
-
const uploadResponse = await fetch('https://opera8-
|
| 86 |
method: 'POST',
|
| 87 |
body: formData
|
| 88 |
});
|
|
@@ -95,7 +95,7 @@ export const uploadEnhancementJob = async (audioBlob: Blob): Promise<any> => {
|
|
| 95 |
const taqviatPayload = `VOICECONFIG_TAQVIAT_userRunId_${currentRunId}_solver_Midpoint_nfe_64_tau_0.5_denoising_true_ext_${ext}`;
|
| 96 |
|
| 97 |
// ۳. ارسال دستور کار صوتی به سیستم مدیریت موازی
|
| 98 |
-
const response = await fetch('https://opera8-
|
| 99 |
method: 'POST',
|
| 100 |
headers: { 'Content-Type': 'application/json' },
|
| 101 |
body: JSON.stringify({
|
|
|
|
| 16 |
formData.append('ext', ext);
|
| 17 |
formData.append('file', file);
|
| 18 |
|
| 19 |
+
const response = await fetch('https://opera8-action.hf.space/api/webhook/upload', {
|
| 20 |
method: 'POST',
|
| 21 |
body: formData
|
| 22 |
});
|
|
|
|
| 40 |
const vevoPayload = `VEVOCONFIG_userRunId_${currentRunId}_sourceExt_${sourceExt}_refExt_${refExt}_spaceUrl_${b64SpaceUrl}`;
|
| 41 |
|
| 42 |
// ۳. ارسال دستور کار به سیستم دیسپچ گیتهاب اکشنز ابری
|
| 43 |
+
const response = await fetch('https://opera8-action.hf.space/api/generate', {
|
| 44 |
method: 'POST',
|
| 45 |
headers: { 'Content-Type': 'application/json' },
|
| 46 |
body: JSON.stringify({
|
|
|
|
| 82 |
formData.append('ext', ext);
|
| 83 |
formData.append('file', audioBlob);
|
| 84 |
|
| 85 |
+
const uploadResponse = await fetch('https://opera8-action.hf.space/api/webhook/upload', {
|
| 86 |
method: 'POST',
|
| 87 |
body: formData
|
| 88 |
});
|
|
|
|
| 95 |
const taqviatPayload = `VOICECONFIG_TAQVIAT_userRunId_${currentRunId}_solver_Midpoint_nfe_64_tau_0.5_denoising_true_ext_${ext}`;
|
| 96 |
|
| 97 |
// ۳. ارسال دستور کار صوتی به سیستم مدیریت موازی
|
| 98 |
+
const response = await fetch('https://opera8-action.hf.space/api/generate', {
|
| 99 |
method: 'POST',
|
| 100 |
headers: { 'Content-Type': 'application/json' },
|
| 101 |
body: JSON.stringify({
|