Spaces:
Running
Running
Update audio_separator/separator/separator.py
Browse files
audio_separator/separator/separator.py
CHANGED
|
@@ -392,6 +392,7 @@ class Separator:
|
|
| 392 |
audio_data = audio_data * (self.amplification_threshold / max_amplitude)
|
| 393 |
return torch.tensor(audio_data, dtype=torch.float32, device=self.torch_device)
|
| 394 |
|
|
|
|
| 395 |
def separate(self, audio_file_path, custom_output_names=None):
|
| 396 |
"""Separate audio file into stems."""
|
| 397 |
if not self.model_instance:
|
|
@@ -418,6 +419,7 @@ class Separator:
|
|
| 418 |
self.logger.info(f"Separation completed in {time.perf_counter() - start_time:.2f} seconds")
|
| 419 |
return output_files
|
| 420 |
|
|
|
|
| 421 |
def _separate_file(self, audio_file_path, custom_output_names=None):
|
| 422 |
"""Internal method to separate a single audio file."""
|
| 423 |
self.logger.debug(f"Processing file: {audio_file_path}")
|
|
|
|
| 392 |
audio_data = audio_data * (self.amplification_threshold / max_amplitude)
|
| 393 |
return torch.tensor(audio_data, dtype=torch.float32, device=self.torch_device)
|
| 394 |
|
| 395 |
+
@spaces.GPU
|
| 396 |
def separate(self, audio_file_path, custom_output_names=None):
|
| 397 |
"""Separate audio file into stems."""
|
| 398 |
if not self.model_instance:
|
|
|
|
| 419 |
self.logger.info(f"Separation completed in {time.perf_counter() - start_time:.2f} seconds")
|
| 420 |
return output_files
|
| 421 |
|
| 422 |
+
@spaces.GPU
|
| 423 |
def _separate_file(self, audio_file_path, custom_output_names=None):
|
| 424 |
"""Internal method to separate a single audio file."""
|
| 425 |
self.logger.debug(f"Processing file: {audio_file_path}")
|