Revert "Add configurable input device selection"
This reverts commit 7ca6958488.
This commit is contained in:
@@ -54,18 +54,14 @@ class WakeWordDetector:
|
||||
pass
|
||||
|
||||
# Открываем поток с параметрами, которые требует Porcupine
|
||||
device_index, device_info = get_audio_manager().resolve_input_device()
|
||||
self.audio_stream = self.pa.open(
|
||||
rate=self.porcupine.sample_rate,
|
||||
channels=1,
|
||||
format=pyaudio.paInt16,
|
||||
input=True,
|
||||
input_device_index=device_index,
|
||||
frames_per_buffer=self.porcupine.frame_length,
|
||||
)
|
||||
self._stream_closed = False
|
||||
device_name = device_info.get("name", "unknown")
|
||||
print(f"🎙️ Wake word input: {device_name}")
|
||||
|
||||
def stop_monitoring(self):
|
||||
"""Явная остановка и закрытие потока (чтобы освободить микрофон для других задач)."""
|
||||
|
||||
Reference in New Issue
Block a user