File size: 863 Bytes
7344bef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from pydub import AudioSegment

class AudioData:
    def __init__(
        self,
        samples,
        mel_chunks,
        duration,
        samples_count,
        sample_rate,
        metadata: any
    ):
        self._samples = samples
        self._mel_chunks = mel_chunks
        self._duration = duration
        self._samples_count = samples_count
        self._sample_rate = sample_rate
        self._metadata = metadata

    @property
    def samples(self):
        return self._samples

    @property
    def mel_chunks(self):
        return self._mel_chunks

    @property
    def duration(self):
        return self._duration

    @property
    def metadata(self):
        return self._metadata

    @property
    def samples_count(self):
        return self._samples_count

    @property
    def sample_rate(self):
        return self._sample_rate