mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-28 00:53:45 +08:00
ci: recognize the NumPy sinc identifier in speaker filtering
This commit is contained in:
@@ -232,7 +232,7 @@ def read_wav(path: Path) -> np.ndarray:
|
||||
def tici_speaker_samples(samples: np.ndarray) -> np.ndarray:
|
||||
"""Reduce bass excursion in built-in tones, once at load time."""
|
||||
taps = np.arange(513, dtype=np.float64) - 256
|
||||
lowpass = np.sinc(2 * 650 / 48000 * taps) * np.hamming(len(taps))
|
||||
lowpass = np.sinc(2 * 650 / 48000 * taps) * np.hamming(len(taps)) # codespell:ignore sinc
|
||||
lowpass /= lowpass.sum()
|
||||
bass = np.convolve(samples, lowpass, mode="full")[256:256 + len(samples)]
|
||||
result = samples.astype(np.float64) - 0.75 * bass
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "a735f236c8645066bb91a393dcb38f35173fe7b26bab0cef572d1840463b5101", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "d76cadf2b4bac652b714f6ca834765ea7cf82507bc5312929b394132b35cd135", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user