I followed the readme steps before proceeding with the operation.
After I finish executing Python main.py
Pop up UI interface with microphone
Click on the microphone
python main.py
Exception in thread Thread-6 (record_audio):
Traceback (most recent call last):
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "C:\Codes\whisper-clip\audio_recorder.py", line 96, in record_audio
with sd.InputStream(callback=self.audio_callback):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\site-packages\sounddevice.py", line 1421, in init
_StreamBase.init(self, kind='input', wrap_callback='array',
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\site-packages\sounddevice.py", line 817, in init
_get_stream_parameters(kind, device, channels, dtype, latency,
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\site-packages\sounddevice.py", line 2660, in get_stream_parameters
info = query_devices(device)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\site-packages\sounddevice.py", line 569, in query_devices
raise PortAudioError(f'Error querying device {device}')
sounddevice.PortAudioError: Error querying device -1
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\tkinter_init.py", line 1967, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "C:\Codes\whisper-clip\audio_recorder.py", line 54, in toggle_recording
self.stop_recording()
File "C:\Codes\whisper-clip\audio_recorder.py", line 69, in stop_recording
audio_data = np.concatenate(self.recordings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: need at least one array to concatenate
Exception in thread Thread-7 (record_audio):
Traceback (most recent call last):
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "C:\Codes\whisper-clip\audio_recorder.py", line 96, in record_audio
with sd.InputStream(callback=self.audio_callback):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\site-packages\sounddevice.py", line 1421, in init
_StreamBase.init(self, kind='input', wrap_callback='array',
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\site-packages\sounddevice.py", line 817, in init
_get_stream_parameters(kind, device, channels, dtype, latency,
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\site-packages\sounddevice.py", line 2660, in get_stream_parameters
info = query_devices(device)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\site-packages\sounddevice.py", line 569, in query_devices
raise PortAudioError(f'Error querying device {device}')
sounddevice.PortAudioError: Error querying device -1
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\qaz21\AppData\Local\Programs\Python\Python312\Lib\tkinter_init.py", line 1967, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "C:\Codes\whisper-clip\audio_recorder.py", line 54, in toggle_recording
self.stop_recording()
File "C:\Codes\whisper-clip\audio_recorder.py", line 69, in stop_recording
audio_data = np.concatenate(self.recordings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: need at least one array to concatenate