Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch processing audio files #175

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Bebra777228
Copy link
Contributor

Batch Processing

Added processing for a list of files and all files from a specified directory. In the code, I indicated the main audio file formats, so if something is missing, you can add it to the list.

Example Code with Class Initialization:

from audio_separator.separator import Separator

separator = Separator()
separator.load_model()

# Processing a single file
output_files = separator.separate("path/to/audio_file.wav")

# Processing all files in a directory
output_files = separator.separate("path/to/audio_directory")

# Processing a list of files
output_files = separator.separate(["path/to/file1.wav", "path/to/file2.wav"])

Example Command-Line Code:

# Processing a single file
audio-separator "audio.wav"

# Processing all files in a directory
audio-separator "path/to/audio_directory"

# Processing a list of files
audio-separator "audio1.wav" "audio2.wav" "audio3.wav"

README Update

  • Changed the icon size and link to HuggingFace Space

    Changed the link to my space, as it contains a full set of all models from audio-separator and is constantly updated to maintain the latest version

  • Modified and supplemented the code example in the Batch processing and processing with multiple models section
  • Changed the Renaming Stems section

You can also try this code yourself in Google Colab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant