Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
288fb45
1
Parent(s):
009c9f3
Modify to output wav at 24k
Browse files- app.py +1 -1
- pipeline_ace_step.py +4 -4
app.py
CHANGED
|
@@ -79,7 +79,7 @@ def main(args):
|
|
| 79 |
)
|
| 80 |
# Return the audio file path
|
| 81 |
if result and len(result) > 0:
|
| 82 |
-
return result[0] # Return first audio output
|
| 83 |
return None
|
| 84 |
|
| 85 |
demo = create_main_demo_ui(
|
|
|
|
| 79 |
)
|
| 80 |
# Return the audio file path
|
| 81 |
if result and len(result) > 0:
|
| 82 |
+
return result[0] # Return first audio output (now always 24kHz WAV)
|
| 83 |
return None
|
| 84 |
|
| 85 |
demo = create_main_demo_ui(
|
pipeline_ace_step.py
CHANGED
|
@@ -1395,9 +1395,9 @@ class ACEStepPipeline:
|
|
| 1395 |
self,
|
| 1396 |
latents,
|
| 1397 |
target_wav_duration_second=30,
|
| 1398 |
-
sample_rate=
|
| 1399 |
save_path=None,
|
| 1400 |
-
format="
|
| 1401 |
):
|
| 1402 |
output_audio_paths = []
|
| 1403 |
bs = latents.shape[0]
|
|
@@ -1414,7 +1414,7 @@ class ACEStepPipeline:
|
|
| 1414 |
return output_audio_paths
|
| 1415 |
|
| 1416 |
def save_wav_file(
|
| 1417 |
-
self, target_wav, idx, save_path=None, sample_rate=
|
| 1418 |
):
|
| 1419 |
if save_path is None:
|
| 1420 |
logger.warning("save_path is None, using default path ./outputs/")
|
|
@@ -1485,7 +1485,7 @@ class ACEStepPipeline:
|
|
| 1485 |
edit_n_max: float = 1.0,
|
| 1486 |
edit_n_avg: int = 1,
|
| 1487 |
save_path: str = None,
|
| 1488 |
-
format: str = "
|
| 1489 |
batch_size: int = 1,
|
| 1490 |
debug: bool = False,
|
| 1491 |
):
|
|
|
|
| 1395 |
self,
|
| 1396 |
latents,
|
| 1397 |
target_wav_duration_second=30,
|
| 1398 |
+
sample_rate=24000,
|
| 1399 |
save_path=None,
|
| 1400 |
+
format="wav",
|
| 1401 |
):
|
| 1402 |
output_audio_paths = []
|
| 1403 |
bs = latents.shape[0]
|
|
|
|
| 1414 |
return output_audio_paths
|
| 1415 |
|
| 1416 |
def save_wav_file(
|
| 1417 |
+
self, target_wav, idx, save_path=None, sample_rate=24000, format="wav"
|
| 1418 |
):
|
| 1419 |
if save_path is None:
|
| 1420 |
logger.warning("save_path is None, using default path ./outputs/")
|
|
|
|
| 1485 |
edit_n_max: float = 1.0,
|
| 1486 |
edit_n_avg: int = 1,
|
| 1487 |
save_path: str = None,
|
| 1488 |
+
format: str = "wav",
|
| 1489 |
batch_size: int = 1,
|
| 1490 |
debug: bool = False,
|
| 1491 |
):
|