"""Audio Embeddings"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/00_core.ipynb.

# %% auto 0
__all__ = ['AudioArray']

# %% ../nbs/00_core.ipynb 3
import numpy as np
from fastcore.all import *

# %% ../nbs/00_core.ipynb 5
class AudioArray(BasicRepr): 
    """Representation for audio data."""
    def __init__(self, a: np.ndarray, sr: int): store_attr()
    @property
    def shape(self): return self.a.shape
    def audio(self): 
        from IPython.display import Audio
        return Audio(self.a, rate=self.sr)
    def __len__(self): return len(self.a)
    def __getitem__(self, idx): return self.a[idx]
