Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions idtap/spectrogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ def from_audio_id(cls, audio_id: str, client: Optional['SwaraClient'] = None) ->
shape = tuple(metadata['shape']) # [freq_bins, time_frames]
data = np.frombuffer(decompressed, dtype=np.uint8).reshape(shape)

# Flip frequency axis so row 0 = lowest frequency (matches freq_bins ordering)
# Server data has row 0 = highest frequency, but we want row 0 = lowest
data = np.flipud(data)

# Get exact audio duration from recording database
time_resolution = None
try:
Expand Down
Loading