fixing bugs and changing device
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ RESPEAKER_RATE = 16000
|
|||||||
RESPEAKER_CHANNELS = 2
|
RESPEAKER_CHANNELS = 2
|
||||||
RESPEAKER_WIDTH = 2
|
RESPEAKER_WIDTH = 2
|
||||||
# run getDeviceInfo.py to get index
|
# run getDeviceInfo.py to get index
|
||||||
RESPEAKER_INDEX = 1 # refer to input device id
|
RESPEAKER_INDEX = 0 # refer to input device id
|
||||||
CHUNK = 1024
|
CHUNK = 1024
|
||||||
WAVE_OUTPUT_FILENAME = "output.wav"
|
WAVE_OUTPUT_FILENAME = "output.wav"
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ frames = []
|
|||||||
for i in range(0, int(RESPEAKER_RATE / CHUNK * RECORD_SECONDS)):
|
for i in range(0, int(RESPEAKER_RATE / CHUNK * RECORD_SECONDS)):
|
||||||
data = stream.read(CHUNK)
|
data = stream.read(CHUNK)
|
||||||
print("read a chunk")
|
print("read a chunk")
|
||||||
print(data.length)
|
|
||||||
frames.append(data)
|
frames.append(data)
|
||||||
|
|
||||||
print("* done recording")
|
print("* done recording")
|
||||||
|
|||||||
Reference in New Issue
Block a user