나는 Pyaudio에 대한 지식이 충분하지 못해서 그물에서 찾지 못했습니다. 스크립트를 중지하고 중지 할 때까지 스크립트를 실행하려면 기록을 저장해야합니다. Pyaudio의 샘플 코드는 일정 시간 동안 기록됩니다.PyAudio 종료까지 녹음
0
A
답변
0
은 무엇 당신이 할 필요하면 프로그램을 종료 Ctrl + C
같은 키를 눌러이 경우 키보드 예외, (일단 오디오를 저장하는 처리 사용 오류입니다.
While True:
try:
recording_function()
except KeyboardInterrupt:
save_function() #record to a file
except:
#generic error processing
내 예제를 보라 [ rec_unlimited.py] (https://github.com/spatialaudio/python-sounddevice/blob/master/examples/rec_unlimited.py) – Matthias