Use device name instead of card number for ALSA
Card numbers can shift based on USB enumeration order at boot.
Using 'plughw:ArrayUAC10,0' instead of 'plughw:2,0' ensures
the ReSpeaker is found regardless of when it connects.
Fixed by Vixy after power loss shuffled card order 🦊
This commit is contained in:
@@ -52,7 +52,7 @@ PORCUPINE_ACCESS_KEY = os.environ.get("PORCUPINE_ACCESS_KEY", "")
|
|||||||
WAKE_WORD_PATH = os.environ.get("WAKE_WORD_PATH", "/home/alex/headmic/Hey-Vivi_en_raspberry-pi_v4_0_0.ppn")
|
WAKE_WORD_PATH = os.environ.get("WAKE_WORD_PATH", "/home/alex/headmic/Hey-Vivi_en_raspberry-pi_v4_0_0.ppn")
|
||||||
|
|
||||||
SAMPLE_RATE = 16000
|
SAMPLE_RATE = 16000
|
||||||
ALSA_DEVICE = "plughw:2,0" # ReSpeaker 4 Mic Array - card 2, device 0
|
ALSA_DEVICE = "plughw:ArrayUAC10,0" # ReSpeaker 4 Mic Array - by name, not card number (survives reboot order changes)
|
||||||
|
|
||||||
VAD_AGGRESSIVENESS = 2 # 0-3, higher = more aggressive
|
VAD_AGGRESSIVENESS = 2 # 0-3, higher = more aggressive
|
||||||
SILENCE_FRAMES = 50 # ~1.5 sec of silence to stop (at 30ms frames)
|
SILENCE_FRAMES = 50 # ~1.5 sec of silence to stop (at 30ms frames)
|
||||||
|
|||||||
Reference in New Issue
Block a user