kopia lustrzana https://github.com/erdewit/HiFiScan
Fix flake8 errors
rodzic
34050fe2a1
commit
dfa02fa5c5
|
@ -85,5 +85,3 @@ class PlayItem:
|
||||||
chunk = self.sound[self.index:idx]
|
chunk = self.sound[self.index:idx]
|
||||||
self.index = idx
|
self.index = idx
|
||||||
return chunk
|
return chunk
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ def write_wav(path: str, data: np.ndarray, rate: int, width: int = 4):
|
||||||
rate: Sample rate in Hz.
|
rate: Sample rate in Hz.
|
||||||
width: Sample width in bytes.
|
width: Sample width in bytes.
|
||||||
"""
|
"""
|
||||||
if not width in [1, 2, 3, 4]:
|
if width not in [1, 2, 3, 4]:
|
||||||
raise ValueError(f'Invalid sample width: {width}')
|
raise ValueError(f'Invalid sample width: {width}')
|
||||||
data = np.asarray(data)
|
data = np.asarray(data)
|
||||||
ch = 1 if len(data.shape) < 2 else len(data)
|
ch = 1 if len(data.shape) < 2 else len(data)
|
||||||
|
|
Ładowanie…
Reference in New Issue