Skip to content

Commit ba52836

Browse files
committed
fix(raspi): Proper closing of stream
fixes #666
1 parent 44b5be8 commit ba52836

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/microphone-speech-to-text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def pyaudio_callback(in_data, frame_count, time_info, status):
122122
pass
123123
except KeyboardInterrupt:
124124
# stop recording
125-
audio_source.completed_recording()
126125
stream.stop_stream()
127126
stream.close()
128127
audio.terminate()
128+
audio_source.completed_recording()

0 commit comments

Comments
 (0)