FL AceStep Scan Audio Directory:
The FL_AceStep_ScanDirectory node is designed to streamline the process of preparing audio datasets for training by scanning a specified directory for audio files. It supports a variety of audio formats, including WAV, MP3, FLAC, OGG, OPUS, and M4A, making it versatile for different audio sources. This node not only identifies audio files but also integrates additional data such as lyrics from accompanying .txt files and metadata from a key_bpm.csv file if available. It calculates the duration of each audio file, which is crucial for training models that require time-based data. The node is particularly beneficial for AI artists and developers who need to organize and preprocess large audio datasets efficiently, ensuring that all relevant information is captured and ready for subsequent training processes.
FL AceStep Scan Audio Directory Input Parameters:
directory
This parameter specifies the path to the directory containing the audio files you wish to scan. It is a required parameter and should be a valid directory path. The node will search this directory for supported audio file formats and any accompanying metadata files. There is no default value, and the directory path must be provided as a string.
all_instrumental
This boolean parameter indicates whether all the audio files in the directory should be treated as instrumental. If set to True, the node will label all audio files as instrumental, which can be useful if your dataset does not contain vocal tracks. The default value is True.
custom_tag
The custom_tag parameter allows you to assign a specific tag to all audio files found during the scan. This can be useful for categorizing or labeling your dataset with a specific style or characteristic. It is an optional string parameter, and if provided, the tag will be applied according to the tag_position setting. The default value is an empty string.
tag_position
This parameter determines the position of the custom_tag in relation to existing tags. It offers three options: prepend, append, and replace. Prepend adds the custom tag before existing tags, append adds it after, and replace substitutes existing tags with the custom tag. The default setting is prepend.
FL AceStep Scan Audio Directory Output Parameters:
dataset
The dataset output is an ACESTEP_DATASET object that contains all the audio samples and their associated metadata collected during the scan. This object is essential for further processing and training tasks, as it organizes the data in a structured format.
sample_count
This integer output represents the total number of audio files found in the specified directory. It provides a quick overview of the dataset size, which can be useful for planning and resource allocation in training tasks.
status
The status output is a string message that provides feedback on the scanning process. It includes information about the number of audio files found and any custom tags applied. This message helps you verify that the scan was successful and provides insights into the dataset's composition.
FL AceStep Scan Audio Directory Usage Tips:
- Ensure that the directory path provided is correct and accessible to avoid errors during the scanning process.
- Use the
custom_tagparameter to categorize your dataset effectively, especially if you plan to use the dataset for specific training tasks that require labeled data. - Consider setting
all_instrumentaltoFalseif your dataset contains vocal tracks, as this will allow the node to process lyrics and other vocal-related metadata.
FL AceStep Scan Audio Directory Common Errors and Solutions:
Invalid directory: <directory>
- Explanation: This error occurs when the specified directory path is invalid or does not exist.
- Solution: Double-check the directory path for typos or errors and ensure that the directory exists and is accessible.
No audio files found in <directory>
- Explanation: The node did not find any audio files in the specified directory.
- Solution: Verify that the directory contains audio files in supported formats and that the file extensions are correct.
ImportError: No module named 'torchaudio' or 'soundfile'
- Explanation: This error indicates that the required audio processing libraries are not installed.
- Solution: Install the missing libraries using pip, for example,
pip install torchaudioorpip install soundfile.
