Open alan-barzilay opened 7 months ago
Actually on further inspection the script seems to be unstable. The first time I tried to make a recording, there were 11 possible microphones for me to pick and it crashed before the recording session started, during the countdown. On following attempts the microphones list was reduced to only 3 and I managed to make some recordings, but it still crashes after some time. I am not sure what are triggering these crashes, am I doing something wrong?
crash:
These sounds already have a folder:
- speach ( 00:04 )
NOTE: It is recommended to record roughly the same amount for each sound
As it will improve the ability for the machine learning models to learn from the data
Whats the name of the sound are you recording? teste
What microphone do you want to record with? ( Empty is the default system mic, [X] exits the recording menu )
You can put a space in between numbers to record with multiple microphones
[0] - HDA Intel PCH: ALC257 Analog (hw:1,0) ALSA
[5] - pulse ALSA
[6] DEFAULT - default ALSA
0
Using input from HDA Intel PCH: ALC257 Analog (hw:1,0) ALSA
Record keyboard controls:
[SPACE] is used to pause and resume the recording session
[BACKSPACE] or [-] removes the last 3 seconds of the recording
[ESC] stops the current recording
Recording paused!
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2050
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2721
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2845
Traceback (most recent call last):
File "/home/barzilay/git/parrot.py/settings.py", line 47, in <module>
root_navigation( True )
File "/home/barzilay/git/parrot.py/settings.py", line 24, in root_navigation
select_mode()
File "/home/barzilay/git/parrot.py/settings.py", line 29, in select_mode
record_sound()
File "/home/barzilay/git/parrot.py/lib/record_data.py", line 263, in record_sound
non_blocking_record(labels, FULL_WAVE_OUTPUT_FILENAME, SRT_FILENAME, microphone_index, index==0)
File "/home/barzilay/git/parrot.py/lib/record_data.py", line 363, in non_blocking_record
audio.open(format=FORMAT, channels=CHANNELS,
File "/home/barzilay/git/parrot.py/.venv_parrot/lib/python3.11/site-packages/pyaudio/__init__.py", line 639, in open
stream = PyAudio.Stream(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/barzilay/git/parrot.py/.venv_parrot/lib/python3.11/site-packages/pyaudio/__init__.py", line 441, in __init__
self._stream = pa.open(**arguments)
^^^^^^^^^^^^^^^^^^^^
OSError: [Errno -9997] Invalid sample rate
/usr/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
could the issue be the microphone i chose? I just picked the first one listed, the names meant nothing that I could recognize. Since it seems to be complaining about the sample rate I wonder if its something related to alsa/ the microphone
now there is 15 microphone options haha I think its the same 11 mics but in a weird reordering.
Am I being stupid? I have only 2 microphones, the laptop built-in one and a razer one
What microphone do you want to record with? ( Empty is the default system mic, [X] exits the recording menu )
You can put a space in between numbers to record with multiple microphones
[0] - Razer Seiren Mini: USB Audio (hw:0,0) ALSA
[1] - HDA Intel PCH: ALC257 Analog (hw:1,0) ALSA
[6] - sysdefault ALSA
[7] - spdif ALSA
[8] - lavrate ALSA
[9] - samplerate ALSA
[10] - speexrate ALSA
[11] - pulse ALSA
[12] - speex ALSA
[13] - upmix ALSA
[14] - vdownmix ALSA
[15] DEFAULT - default ALSA
hi! I was following the guide for my installation but upon running
python3 settings.py
I got the following error:After searching the error online I found this issue on pyautogui: https://github.com/asweigart/pyautogui/issues/683 It's not very clear to me what's causing this problem. But there was a solution proposed that seems to work for me, which is to simply install TK through pacman.
However now when I run
python3 settings.py
I get a bunch of warnings:Is this normal or expected behavior? Not sure what is causing it or if It's anything important at all since I can still use the script normally.