Ошибка:

Exception has occurred: ValueError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
NAME_1 array with 0 sample(s) (shape=(0, 68)) while a minimum of 1 is required by StandardScaler.
  File "C:\Projects\stackoverflow_qa_parser\stackoverflow_qa_parser\Lib\site-packages\sklearn\utils\validation.py", line 931, in check_array
    raise ValueError(
  File "C:\Projects\stackoverflow_qa_parser\stackoverflow_qa_parser\Lib\site-packages\sklearn\base.py", line 565, in _validate_data
    X = check_array(X, input_name="X", **check_params)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Projects\stackoverflow_qa_parser\stackoverflow_qa_parser\Lib\site-packages\sklearn\preprocessing\_data.py", line 861, in partial_fit
    X = self._validate_data(
        ^^^^^^^^^^^^^^^^^^^^
  File "C:\Projects\stackoverflow_qa_parser\stackoverflow_qa_parser\Lib\site-packages\sklearn\preprocessing\_data.py", line 824, in fit
    return self.partial_fit(X, y, sample_weight)

в коде:

import sounddevice as sd
import soundfile as sf
from pyAudioAnalysis import audioSegmentation
import numpy as np
from sklearn.preprocessing import StandardScaler

VIRTUAL_CABLE_NAME = 'Line 1 (Virtual Audio Cable)'

# Выберите устройство виртуального аудиокабеля.
input_device_info = None
p = sd.query_devices()
for i in range(len(p)):
    if p[i]['name'] == VIRTUAL_CABLE_NAME:
        input_device_info = p[i]
        break

if input_device_info is None:
    raise Exception(f'Устройство с именем "{VIRTUAL_CABLE_NAME}" не найдено')

# Установите параметры записи.
FORMAT = 'PCM_16'
CHANNELS = input_device_info['max_input_channels']
RATE = int(input_device_info['default_samplerate'])
CHUNK = 1024 * 4  # Минимальный размер обработанного кадра

scaler = StandardScaler()

is_recording = False
while True:
    # Открываем поток записи
    with sd.InputStream(device=input_device_info['index'], samplerate=RATE, channels=CHANNELS,
                         blocksize=CHUNK, dtype='int16') as stream:
        print(f'Поступление данных по виртуальному кабелю "{VIRTUAL_CABLE_NAME}" началось')
        # Открываем файл для записи
        with sf.SoundFile("audio.wav", 'w', samplerate=RATE, channels=CHANNELS, format='WAV') as wf:

            # Записываем звуковой сигнал
            is_speech_detected = False
            speech_frames = []
            silence_removed = None
            while True:
                data, overflowed = stream.read(CHUNK)
                if overflowed:
                    print("Warning: Inpu