spotify-apimatic-sdk 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spotify_apimatic_sdk-1.0.0.dist-info/METADATA +150 -0
- spotify_apimatic_sdk-1.0.0.dist-info/RECORD +186 -0
- spotify_apimatic_sdk-1.0.0.dist-info/WHEEL +5 -0
- spotify_apimatic_sdk-1.0.0.dist-info/licenses/LICENSE +30 -0
- spotify_apimatic_sdk-1.0.0.dist-info/top_level.txt +1 -0
- spotifywebapi/__init__.py +12 -0
- spotifywebapi/api_helper.py +19 -0
- spotifywebapi/configuration.py +318 -0
- spotifywebapi/controllers/__init__.py +20 -0
- spotifywebapi/controllers/albums_controller.py +498 -0
- spotifywebapi/controllers/artists_controller.py +327 -0
- spotifywebapi/controllers/audiobooks_controller.py +441 -0
- spotifywebapi/controllers/base_controller.py +67 -0
- spotifywebapi/controllers/categories_controller.py +161 -0
- spotifywebapi/controllers/chapters_controller.py +157 -0
- spotifywebapi/controllers/episodes_controller.py +390 -0
- spotifywebapi/controllers/genres_controller.py +84 -0
- spotifywebapi/controllers/markets_controller.py +82 -0
- spotifywebapi/controllers/o_auth_authorization_controller.py +156 -0
- spotifywebapi/controllers/player_controller.py +807 -0
- spotifywebapi/controllers/playlists_controller.py +851 -0
- spotifywebapi/controllers/search_controller.py +123 -0
- spotifywebapi/controllers/shows_controller.py +439 -0
- spotifywebapi/controllers/tracks_controller.py +821 -0
- spotifywebapi/controllers/users_controller.py +649 -0
- spotifywebapi/exceptions/__init__.py +11 -0
- spotifywebapi/exceptions/api_exception.py +36 -0
- spotifywebapi/exceptions/bad_request_exception.py +56 -0
- spotifywebapi/exceptions/forbidden_exception.py +56 -0
- spotifywebapi/exceptions/not_found_exception.py +56 -0
- spotifywebapi/exceptions/o_auth_provider_exception.py +73 -0
- spotifywebapi/exceptions/too_many_requests_exception.py +56 -0
- spotifywebapi/exceptions/unauthorized_exception.py +56 -0
- spotifywebapi/http/__init__.py +11 -0
- spotifywebapi/http/api_response.py +67 -0
- spotifywebapi/http/auth/__init__.py +5 -0
- spotifywebapi/http/auth/o_auth_2.py +336 -0
- spotifywebapi/http/http_call_back.py +20 -0
- spotifywebapi/http/http_client_provider.py +23 -0
- spotifywebapi/http/http_method_enum.py +25 -0
- spotifywebapi/http/http_request.py +55 -0
- spotifywebapi/http/http_response.py +45 -0
- spotifywebapi/http/proxy_settings.py +50 -0
- spotifywebapi/models/__init__.py +142 -0
- spotifywebapi/models/album_base.py +264 -0
- spotifywebapi/models/album_group_enum.py +51 -0
- spotifywebapi/models/album_object.py +375 -0
- spotifywebapi/models/album_restriction_object.py +109 -0
- spotifywebapi/models/album_type_enum.py +62 -0
- spotifywebapi/models/artist_discography_album_object.py +298 -0
- spotifywebapi/models/artist_object.py +335 -0
- spotifywebapi/models/audio_analysis_object.py +266 -0
- spotifywebapi/models/audio_features_object.py +518 -0
- spotifywebapi/models/audiobook_base.py +353 -0
- spotifywebapi/models/audiobook_object.py +369 -0
- spotifywebapi/models/author_object.py +85 -0
- spotifywebapi/models/categories.py +162 -0
- spotifywebapi/models/category_object.py +117 -0
- spotifywebapi/models/chapter_base.py +392 -0
- spotifywebapi/models/chapter_object.py +408 -0
- spotifywebapi/models/chapter_restriction_object.py +113 -0
- spotifywebapi/models/context_object.py +181 -0
- spotifywebapi/models/copyright_object.py +130 -0
- spotifywebapi/models/currently_playing_context_object.py +314 -0
- spotifywebapi/models/currently_playing_object.py +241 -0
- spotifywebapi/models/cursor_object.py +108 -0
- spotifywebapi/models/cursor_paged_artists.py +75 -0
- spotifywebapi/models/cursor_paging_object.py +183 -0
- spotifywebapi/models/cursor_paging_play_history_object.py +214 -0
- spotifywebapi/models/cursor_paging_simplified_artist_object.py +213 -0
- spotifywebapi/models/device_object.py +278 -0
- spotifywebapi/models/disallows_object.py +314 -0
- spotifywebapi/models/episode_base.py +394 -0
- spotifywebapi/models/episode_object.py +665 -0
- spotifywebapi/models/episode_restriction_object.py +112 -0
- spotifywebapi/models/error_object.py +85 -0
- spotifywebapi/models/explicit_content_settings_object.py +110 -0
- spotifywebapi/models/external_id_object.py +156 -0
- spotifywebapi/models/external_url_object.py +107 -0
- spotifywebapi/models/followers_object.py +134 -0
- spotifywebapi/models/image_object.py +168 -0
- spotifywebapi/models/include_external_enum.py +45 -0
- spotifywebapi/models/item_type_1_enum.py +56 -0
- spotifywebapi/models/item_type_2_enum.py +45 -0
- spotifywebapi/models/item_type_3_enum.py +45 -0
- spotifywebapi/models/item_type_enum.py +58 -0
- spotifywebapi/models/linked_track_object.py +205 -0
- spotifywebapi/models/many_albums.py +76 -0
- spotifywebapi/models/many_artists.py +76 -0
- spotifywebapi/models/many_audio_features.py +77 -0
- spotifywebapi/models/many_audiobooks.py +77 -0
- spotifywebapi/models/many_chapters.py +77 -0
- spotifywebapi/models/many_devices.py +76 -0
- spotifywebapi/models/many_episodes.py +77 -0
- spotifywebapi/models/many_genres.py +69 -0
- spotifywebapi/models/many_simplified_shows.py +74 -0
- spotifywebapi/models/many_tracks.py +76 -0
- spotifywebapi/models/markets.py +85 -0
- spotifywebapi/models/me_albums_request.py +90 -0
- spotifywebapi/models/me_episodes_request.py +73 -0
- spotifywebapi/models/me_episodes_request_1.py +89 -0
- spotifywebapi/models/me_following_request.py +74 -0
- spotifywebapi/models/me_following_request_1.py +90 -0
- spotifywebapi/models/me_player_play_request.py +165 -0
- spotifywebapi/models/me_player_request.py +103 -0
- spotifywebapi/models/me_shows_request.py +89 -0
- spotifywebapi/models/me_tracks_request.py +74 -0
- spotifywebapi/models/me_tracks_request_1.py +90 -0
- spotifywebapi/models/meta.py +227 -0
- spotifywebapi/models/mode_enum.py +52 -0
- spotifywebapi/models/narrator_object.py +85 -0
- spotifywebapi/models/o_auth_provider_error_enum.py +67 -0
- spotifywebapi/models/o_auth_scope_enum.py +98 -0
- spotifywebapi/models/o_auth_token.py +113 -0
- spotifywebapi/models/paged_albums.py +75 -0
- spotifywebapi/models/paged_categories.py +74 -0
- spotifywebapi/models/paging_artist_discography_album_object.py +163 -0
- spotifywebapi/models/paging_artist_object.py +162 -0
- spotifywebapi/models/paging_featured_playlist_object.py +113 -0
- spotifywebapi/models/paging_object.py +142 -0
- spotifywebapi/models/paging_playlist_object.py +163 -0
- spotifywebapi/models/paging_playlist_track_object.py +163 -0
- spotifywebapi/models/paging_saved_album_object.py +163 -0
- spotifywebapi/models/paging_saved_audiobook_object.py +163 -0
- spotifywebapi/models/paging_saved_episode_object.py +163 -0
- spotifywebapi/models/paging_saved_show_object.py +163 -0
- spotifywebapi/models/paging_saved_track_object.py +163 -0
- spotifywebapi/models/paging_simplified_album_object.py +163 -0
- spotifywebapi/models/paging_simplified_audiobook_object.py +162 -0
- spotifywebapi/models/paging_simplified_chapter_object.py +162 -0
- spotifywebapi/models/paging_simplified_episode_object.py +162 -0
- spotifywebapi/models/paging_simplified_show_object.py +160 -0
- spotifywebapi/models/paging_simplified_track_object.py +163 -0
- spotifywebapi/models/paging_track_object.py +162 -0
- spotifywebapi/models/play_history_object.py +141 -0
- spotifywebapi/models/playlist_object.py +425 -0
- spotifywebapi/models/playlist_owner_object.py +238 -0
- spotifywebapi/models/playlist_snapshot_id.py +85 -0
- spotifywebapi/models/playlist_track_object.py +171 -0
- spotifywebapi/models/playlist_tracks_ref_object.py +109 -0
- spotifywebapi/models/playlist_user_object.py +231 -0
- spotifywebapi/models/playlists_followers_request.py +86 -0
- spotifywebapi/models/playlists_request.py +160 -0
- spotifywebapi/models/playlists_tracks_request.py +121 -0
- spotifywebapi/models/playlists_tracks_request_1.py +188 -0
- spotifywebapi/models/playlists_tracks_request_2.py +109 -0
- spotifywebapi/models/private_user_object.py +379 -0
- spotifywebapi/models/public_user_object.py +268 -0
- spotifywebapi/models/queue_object.py +118 -0
- spotifywebapi/models/reason_enum.py +65 -0
- spotifywebapi/models/recommendation_seed_object.py +208 -0
- spotifywebapi/models/recommendations_object.py +96 -0
- spotifywebapi/models/release_date_precision_enum.py +62 -0
- spotifywebapi/models/resume_point_object.py +131 -0
- spotifywebapi/models/saved_album_object.py +118 -0
- spotifywebapi/models/saved_audiobook_object.py +118 -0
- spotifywebapi/models/saved_episode_object.py +116 -0
- spotifywebapi/models/saved_show_object.py +116 -0
- spotifywebapi/models/saved_track_object.py +118 -0
- spotifywebapi/models/search_items.py +256 -0
- spotifywebapi/models/section_object.py +362 -0
- spotifywebapi/models/segment_object.py +307 -0
- spotifywebapi/models/show_base.py +550 -0
- spotifywebapi/models/show_object.py +319 -0
- spotifywebapi/models/simplified_album_object.py +468 -0
- spotifywebapi/models/simplified_artist_object.py +228 -0
- spotifywebapi/models/simplified_playlist_object.py +398 -0
- spotifywebapi/models/simplified_track_object.py +494 -0
- spotifywebapi/models/time_interval_object.py +132 -0
- spotifywebapi/models/track.py +697 -0
- spotifywebapi/models/track_1.py +85 -0
- spotifywebapi/models/track_object.py +605 -0
- spotifywebapi/models/track_restriction_object.py +112 -0
- spotifywebapi/models/type_2_enum.py +56 -0
- spotifywebapi/models/type_3_enum.py +56 -0
- spotifywebapi/models/type_4_enum.py +56 -0
- spotifywebapi/models/type_5_enum.py +56 -0
- spotifywebapi/models/type_6_enum.py +56 -0
- spotifywebapi/models/type_8_enum.py +42 -0
- spotifywebapi/models/type_9_enum.py +42 -0
- spotifywebapi/models/type_enum.py +56 -0
- spotifywebapi/models/users_playlists_request.py +154 -0
- spotifywebapi/spotifywebapi_client.py +198 -0
- spotifywebapi/utilities/__init__.py +6 -0
- spotifywebapi/utilities/file_wrapper.py +45 -0
- spotifywebapi/utilities/union_type_lookup.py +113 -0
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
"""spotifywebapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from spotifywebapi.api_helper import APIHelper
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SegmentObject(object):
|
|
11
|
+
"""Implementation of the 'SegmentObject' model.
|
|
12
|
+
|
|
13
|
+
Attributes:
|
|
14
|
+
start (float): The starting point (in seconds) of the segment.
|
|
15
|
+
duration (float): The duration (in seconds) of the segment.
|
|
16
|
+
confidence (float): The confidence, from 0.0 to 1.0, of the reliability of
|
|
17
|
+
the segmentation. Segments of the song which are difficult to logically
|
|
18
|
+
segment (e.g: noise) may correspond to low values in this field.
|
|
19
|
+
loudness_start (float): The onset loudness of the segment in decibels (dB).
|
|
20
|
+
Combined with `loudness_max` and `loudness_max_time`, these components
|
|
21
|
+
can be used to describe the "attack" of the segment.
|
|
22
|
+
loudness_max (float): The peak loudness of the segment in decibels (dB).
|
|
23
|
+
Combined with `loudness_start` and `loudness_max_time`, these components
|
|
24
|
+
can be used to describe the "attack" of the segment.
|
|
25
|
+
loudness_max_time (float): The segment-relative offset of the segment peak
|
|
26
|
+
loudness in seconds. Combined with `loudness_start` and `loudness_max`,
|
|
27
|
+
these components can be used to desctibe the "attack" of the segment.
|
|
28
|
+
loudness_end (float): The offset loudness of the segment in decibels (dB).
|
|
29
|
+
This value should be equivalent to the loudness_start of the following
|
|
30
|
+
segment.
|
|
31
|
+
pitches (List[float]): Pitch content is given by a “chroma” vector,
|
|
32
|
+
corresponding to the 12 pitch classes C, C#, D to B, with values ranging
|
|
33
|
+
from 0 to 1 that describe the relative dominance of every pitch in the
|
|
34
|
+
chromatic scale. For example a C Major chord would likely be represented
|
|
35
|
+
by large values of C, E and G (i.e. classes 0, 4, and 7). Vectors are
|
|
36
|
+
normalized to 1 by their strongest dimension, therefore noisy sounds are
|
|
37
|
+
likely represented by values that are all close to 1, while pure tones
|
|
38
|
+
are described by one value at 1 (the pitch) and others near 0. As can be
|
|
39
|
+
seen below, the 12 vector indices are a combination of low-power spectrum
|
|
40
|
+
values at their respective pitch frequencies. 
|
|
42
|
+
timbre (List[float]): Timbre is the quality of a musical note or sound that
|
|
43
|
+
distinguishes different types of musical instruments, or voices. It is a
|
|
44
|
+
complex notion also referred to as sound color, texture, or tone quality,
|
|
45
|
+
and is derived from the shape of a segment’s spectro-temporal surface,
|
|
46
|
+
independently of pitch and loudness. The timbre feature is a vector that
|
|
47
|
+
includes 12 unbounded values roughly centered around 0. Those values are
|
|
48
|
+
high level abstractions of the spectral surface, ordered by degree of
|
|
49
|
+
importance. For completeness however, the first dimension represents the
|
|
50
|
+
average loudness of the segment; second emphasizes brightness; third is
|
|
51
|
+
more closely correlated to the flatness of a sound; fourth to sounds with
|
|
52
|
+
a stronger attack; etc. See an image below representing the 12 basis
|
|
53
|
+
functions (i.e. template segments).  The actual timbre of the segment is best described as a linear
|
|
56
|
+
combination of these 12 basis functions weighted by the coefficient
|
|
57
|
+
values: timbre = c1 x b1 + c2 x b2 + ... + c12 x b12, where c1 to c12
|
|
58
|
+
represent the 12 coefficients and b1 to b12 the 12 basis functions as
|
|
59
|
+
displayed below. Timbre vectors are best used in comparison with each
|
|
60
|
+
other.
|
|
61
|
+
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
# Create a mapping from Model property names to API property names
|
|
65
|
+
_names = {
|
|
66
|
+
"start": "start",
|
|
67
|
+
"duration": "duration",
|
|
68
|
+
"confidence": "confidence",
|
|
69
|
+
"loudness_start": "loudness_start",
|
|
70
|
+
"loudness_max": "loudness_max",
|
|
71
|
+
"loudness_max_time": "loudness_max_time",
|
|
72
|
+
"loudness_end": "loudness_end",
|
|
73
|
+
"pitches": "pitches",
|
|
74
|
+
"timbre": "timbre",
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
_optionals = [
|
|
78
|
+
"start",
|
|
79
|
+
"duration",
|
|
80
|
+
"confidence",
|
|
81
|
+
"loudness_start",
|
|
82
|
+
"loudness_max",
|
|
83
|
+
"loudness_max_time",
|
|
84
|
+
"loudness_end",
|
|
85
|
+
"pitches",
|
|
86
|
+
"timbre",
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
def __init__(
|
|
90
|
+
self,
|
|
91
|
+
start=APIHelper.SKIP,
|
|
92
|
+
duration=APIHelper.SKIP,
|
|
93
|
+
confidence=APIHelper.SKIP,
|
|
94
|
+
loudness_start=APIHelper.SKIP,
|
|
95
|
+
loudness_max=APIHelper.SKIP,
|
|
96
|
+
loudness_max_time=APIHelper.SKIP,
|
|
97
|
+
loudness_end=APIHelper.SKIP,
|
|
98
|
+
pitches=APIHelper.SKIP,
|
|
99
|
+
timbre=APIHelper.SKIP):
|
|
100
|
+
"""Initialize a SegmentObject instance."""
|
|
101
|
+
# Initialize members of the class
|
|
102
|
+
if start is not APIHelper.SKIP:
|
|
103
|
+
self.start = start
|
|
104
|
+
if duration is not APIHelper.SKIP:
|
|
105
|
+
self.duration = duration
|
|
106
|
+
if confidence is not APIHelper.SKIP:
|
|
107
|
+
self.confidence = confidence
|
|
108
|
+
if loudness_start is not APIHelper.SKIP:
|
|
109
|
+
self.loudness_start = loudness_start
|
|
110
|
+
if loudness_max is not APIHelper.SKIP:
|
|
111
|
+
self.loudness_max = loudness_max
|
|
112
|
+
if loudness_max_time is not APIHelper.SKIP:
|
|
113
|
+
self.loudness_max_time = loudness_max_time
|
|
114
|
+
if loudness_end is not APIHelper.SKIP:
|
|
115
|
+
self.loudness_end = loudness_end
|
|
116
|
+
if pitches is not APIHelper.SKIP:
|
|
117
|
+
self.pitches = pitches
|
|
118
|
+
if timbre is not APIHelper.SKIP:
|
|
119
|
+
self.timbre = timbre
|
|
120
|
+
|
|
121
|
+
@classmethod
|
|
122
|
+
def from_dictionary(cls,
|
|
123
|
+
dictionary):
|
|
124
|
+
"""Create an instance of this model from a dictionary
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
128
|
+
as obtained from the deserialization of the server's response. The
|
|
129
|
+
keys MUST match property names in the API description.
|
|
130
|
+
|
|
131
|
+
Returns:
|
|
132
|
+
object: An instance of this structure class.
|
|
133
|
+
|
|
134
|
+
"""
|
|
135
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
136
|
+
return None
|
|
137
|
+
|
|
138
|
+
# Extract variables from the dictionary
|
|
139
|
+
start =\
|
|
140
|
+
dictionary.get("start")\
|
|
141
|
+
if dictionary.get("start")\
|
|
142
|
+
else APIHelper.SKIP
|
|
143
|
+
duration =\
|
|
144
|
+
dictionary.get("duration")\
|
|
145
|
+
if dictionary.get("duration")\
|
|
146
|
+
else APIHelper.SKIP
|
|
147
|
+
confidence =\
|
|
148
|
+
dictionary.get("confidence")\
|
|
149
|
+
if dictionary.get("confidence")\
|
|
150
|
+
else APIHelper.SKIP
|
|
151
|
+
loudness_start =\
|
|
152
|
+
dictionary.get("loudness_start")\
|
|
153
|
+
if dictionary.get("loudness_start")\
|
|
154
|
+
else APIHelper.SKIP
|
|
155
|
+
loudness_max =\
|
|
156
|
+
dictionary.get("loudness_max")\
|
|
157
|
+
if dictionary.get("loudness_max")\
|
|
158
|
+
else APIHelper.SKIP
|
|
159
|
+
loudness_max_time =\
|
|
160
|
+
dictionary.get("loudness_max_time")\
|
|
161
|
+
if dictionary.get("loudness_max_time")\
|
|
162
|
+
else APIHelper.SKIP
|
|
163
|
+
loudness_end =\
|
|
164
|
+
dictionary.get("loudness_end")\
|
|
165
|
+
if dictionary.get("loudness_end")\
|
|
166
|
+
else APIHelper.SKIP
|
|
167
|
+
pitches =\
|
|
168
|
+
dictionary.get("pitches")\
|
|
169
|
+
if dictionary.get("pitches")\
|
|
170
|
+
else APIHelper.SKIP
|
|
171
|
+
timbre =\
|
|
172
|
+
dictionary.get("timbre")\
|
|
173
|
+
if dictionary.get("timbre")\
|
|
174
|
+
else APIHelper.SKIP
|
|
175
|
+
|
|
176
|
+
# Return an object of this model
|
|
177
|
+
return cls(start,
|
|
178
|
+
duration,
|
|
179
|
+
confidence,
|
|
180
|
+
loudness_start,
|
|
181
|
+
loudness_max,
|
|
182
|
+
loudness_max_time,
|
|
183
|
+
loudness_end,
|
|
184
|
+
pitches,
|
|
185
|
+
timbre)
|
|
186
|
+
|
|
187
|
+
def __repr__(self):
|
|
188
|
+
"""Return a unambiguous string representation."""
|
|
189
|
+
_start=(
|
|
190
|
+
self.start
|
|
191
|
+
if hasattr(self, "start")
|
|
192
|
+
else None
|
|
193
|
+
)
|
|
194
|
+
_duration=(
|
|
195
|
+
self.duration
|
|
196
|
+
if hasattr(self, "duration")
|
|
197
|
+
else None
|
|
198
|
+
)
|
|
199
|
+
_confidence=(
|
|
200
|
+
self.confidence
|
|
201
|
+
if hasattr(self, "confidence")
|
|
202
|
+
else None
|
|
203
|
+
)
|
|
204
|
+
_loudness_start=(
|
|
205
|
+
self.loudness_start
|
|
206
|
+
if hasattr(self, "loudness_start")
|
|
207
|
+
else None
|
|
208
|
+
)
|
|
209
|
+
_loudness_max=(
|
|
210
|
+
self.loudness_max
|
|
211
|
+
if hasattr(self, "loudness_max")
|
|
212
|
+
else None
|
|
213
|
+
)
|
|
214
|
+
_loudness_max_time=(
|
|
215
|
+
self.loudness_max_time
|
|
216
|
+
if hasattr(self, "loudness_max_time")
|
|
217
|
+
else None
|
|
218
|
+
)
|
|
219
|
+
_loudness_end=(
|
|
220
|
+
self.loudness_end
|
|
221
|
+
if hasattr(self, "loudness_end")
|
|
222
|
+
else None
|
|
223
|
+
)
|
|
224
|
+
_pitches=(
|
|
225
|
+
self.pitches
|
|
226
|
+
if hasattr(self, "pitches")
|
|
227
|
+
else None
|
|
228
|
+
)
|
|
229
|
+
_timbre=(
|
|
230
|
+
self.timbre
|
|
231
|
+
if hasattr(self, "timbre")
|
|
232
|
+
else None
|
|
233
|
+
)
|
|
234
|
+
return (
|
|
235
|
+
f"{self.__class__.__name__}("
|
|
236
|
+
f"start={_start!r}, "
|
|
237
|
+
f"duration={_duration!r}, "
|
|
238
|
+
f"confidence={_confidence!r}, "
|
|
239
|
+
f"loudness_start={_loudness_start!r}, "
|
|
240
|
+
f"loudness_max={_loudness_max!r}, "
|
|
241
|
+
f"loudness_max_time={_loudness_max_time!r}, "
|
|
242
|
+
f"loudness_end={_loudness_end!r}, "
|
|
243
|
+
f"pitches={_pitches!r}, "
|
|
244
|
+
f"timbre={_timbre!r}, "
|
|
245
|
+
f")"
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
def __str__(self):
|
|
249
|
+
"""Return a human-readable string representation."""
|
|
250
|
+
_start=(
|
|
251
|
+
self.start
|
|
252
|
+
if hasattr(self, "start")
|
|
253
|
+
else None
|
|
254
|
+
)
|
|
255
|
+
_duration=(
|
|
256
|
+
self.duration
|
|
257
|
+
if hasattr(self, "duration")
|
|
258
|
+
else None
|
|
259
|
+
)
|
|
260
|
+
_confidence=(
|
|
261
|
+
self.confidence
|
|
262
|
+
if hasattr(self, "confidence")
|
|
263
|
+
else None
|
|
264
|
+
)
|
|
265
|
+
_loudness_start=(
|
|
266
|
+
self.loudness_start
|
|
267
|
+
if hasattr(self, "loudness_start")
|
|
268
|
+
else None
|
|
269
|
+
)
|
|
270
|
+
_loudness_max=(
|
|
271
|
+
self.loudness_max
|
|
272
|
+
if hasattr(self, "loudness_max")
|
|
273
|
+
else None
|
|
274
|
+
)
|
|
275
|
+
_loudness_max_time=(
|
|
276
|
+
self.loudness_max_time
|
|
277
|
+
if hasattr(self, "loudness_max_time")
|
|
278
|
+
else None
|
|
279
|
+
)
|
|
280
|
+
_loudness_end=(
|
|
281
|
+
self.loudness_end
|
|
282
|
+
if hasattr(self, "loudness_end")
|
|
283
|
+
else None
|
|
284
|
+
)
|
|
285
|
+
_pitches=(
|
|
286
|
+
self.pitches
|
|
287
|
+
if hasattr(self, "pitches")
|
|
288
|
+
else None
|
|
289
|
+
)
|
|
290
|
+
_timbre=(
|
|
291
|
+
self.timbre
|
|
292
|
+
if hasattr(self, "timbre")
|
|
293
|
+
else None
|
|
294
|
+
)
|
|
295
|
+
return (
|
|
296
|
+
f"{self.__class__.__name__}("
|
|
297
|
+
f"start={_start!s}, "
|
|
298
|
+
f"duration={_duration!s}, "
|
|
299
|
+
f"confidence={_confidence!s}, "
|
|
300
|
+
f"loudness_start={_loudness_start!s}, "
|
|
301
|
+
f"loudness_max={_loudness_max!s}, "
|
|
302
|
+
f"loudness_max_time={_loudness_max_time!s}, "
|
|
303
|
+
f"loudness_end={_loudness_end!s}, "
|
|
304
|
+
f"pitches={_pitches!s}, "
|
|
305
|
+
f"timbre={_timbre!s}, "
|
|
306
|
+
f")"
|
|
307
|
+
)
|