(.venv) (base) ➜ voice2text python main.py

9 min read

/Users/pan/voice2text/.venv/lib/python3.10/site-packages/whisper/timing.py:58: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def backtrace(trace: np.ndarray):
开始录制...
Traceback (most recent call last):
File "/Users/pan/voice2text/main.py", line 42, in
active = vad.is_speech(chunk.tobytes(), RATE)
File "/Users/pan/voice2text/.venv/lib/python3.10/site-packages/webrtcvad.py", line 27, in is_speech
return _webrtcvad.process(self._vad, sample_rate, buf, length)
webrtcvad.Error: Error while processing frame

It seems there is an error in the code related to recording and speech detection using the WebRTC Voice Activity Detection (VAD) library. The error message suggests that there might be an issue with the processing of audio frames. It is possible that the input audio format or sample rate is not compatible with the VAD library. Additionally, the warning message about NumbaDeprecationWarning may indicate that the version of Numba used in the code is outdated and incompatible with current versions of Python. This issue can be resolved by updating Numba to the latest version or by providing the 'nopython' keyword argument to the numba.jit decorator.