Skip to content

Commit 66e16ee

Browse files
committed
remove defaults, update clean command
1 parent 4774320 commit 66e16ee

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ test:
1414

1515
clean:
1616
find . -name "*.pyc" -delete
17-
find . -name "__pycache__" -delete
17+
find . -name "__pycache__" -delete
18+
rm -rf .pytest_cache htmlcov .coverage
19+
20+
clean-all: clean
21+
rm -rf .eggs *.egg-info dist
22+

auroraapi/audio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,11 @@ def stream(length=0, silence_len=1.0):
157157
yield chunk.tostring()
158158

159159
def _is_silent(data):
160+
if len(data) == 0:
161+
return True
160162
return max(data) < SILENT_THRESH
161163

162-
def _pyaudio_record(length=0, silence_len=1.0):
164+
def _pyaudio_record(length, silence_len):
163165
p = pyaudio.PyAudio()
164166
stream = p.open(
165167
rate=RATE,

0 commit comments

Comments
 (0)