src.embeddings.birdnet ====================== .. py:module:: src.embeddings.birdnet Classes ------- .. autoapisummary:: src.embeddings.birdnet.BirdnetEmbedding Module Contents --------------- .. py:class:: BirdnetEmbedding(dataset_name: str, clip_duration: float = 3.0, model_path: Optional[Union[str, pathlib.Path]] = os.path.join('assets', 'models', 'birdnet', 'V2.4', 'BirdNET_GLOBAL_6K_V2.4_Model'), sampling_rate: Optional[int] = None) Bases: :py:obj:`embeddings.BaseEmbedding` BirdNet embedding model class for generating embeddings from audio data using the BirdNET model. This class extends the BaseEmbedding class and provides the specific implementation for loading the BirdNet model and processing audio datasets. BirdNet is used for analyzing and extracting features from audio clips, often for tasks such as species identification from bird calls. Inherited Attributes: --------------------- model_path : str Path to the pre-trained model used for generating embeddings. dask_client : dask.distributed.client.Client or None Optional Dask client for handling distributed task execution. Methods: -------- load_model(): Loads the BirdNet-specific model using TensorFlow. process(dataset_name: str, extension: str = '.wav', sampling_rate: int = 48000): Processes the audio dataset to generate embeddings using the BirdNet model. .. py:attribute:: sampling_rate .. py:method:: load_model() Load the BirdNet-specific model, using a TensorFlow SMLayer for generating embeddings. .. py:method:: process() Process the dataset using the BirdNet model to generate embeddings. :param dataset_name: Name of the dataset to process. :param sampling_rate: The sampling rate for the audio files (default is 48,000). :return: A pandas DataFrame containing the generated embeddings.