mirror of
https://github.com/kennethreitz/interpretations.git
synced 2026-06-05 23:00:19 +00:00
play.py: braille spectrum analyzer ⡀⡄⡆⡇⣇⣧⣷⣿
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -323,7 +323,7 @@ def play_audio(buf, sample_rate, title="", info_lines=None, offset_sec=0.0):
|
||||
# Spectrum analyzer — FFT frequency bands displayed as EQ bars
|
||||
import numpy as np
|
||||
scope_w = 48
|
||||
bars = " ▁▂▃▄▅▆▇█"
|
||||
bars = "⠀⡀⡄⡆⡇⣇⣧⣷⣿"
|
||||
window_size = int(sample_rate * 0.05)
|
||||
start_s = max(0, pos - window_size // 2)
|
||||
end_s = min(total_frames, start_s + window_size)
|
||||
|
||||
Reference in New Issue
Block a user