Update linux-voice-assistant-2mic-install.md
Updated the tutorial to reflect the change to config.json instead of command line arguements.
This commit is contained in:
@@ -77,7 +77,7 @@ mkdir -p ~/.config/systemd/user
|
|||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp ~/linux-voice-assistant/service/user-pw-linux-voice-assistant.service ~/.config/systemd/user/linux-voice-assistant.service
|
cp ~/linux-voice-assistant/service/linux-voice-assistant.service ~/.config/systemd/user/linux-voice-assistant.service
|
||||||
```
|
```
|
||||||
|
|
||||||
**Enable & start:**
|
**Enable & start:**
|
||||||
@@ -108,7 +108,7 @@ mkdir -p ~/.config/systemd/user
|
|||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp ~/linux-voice-assistant/service/user-pa-linux-voice-assistant.service ~/.config/systemd/user/linux-voice-assistant.service
|
cp ~/linux-voice-assistant/service/linux-voice-assistant.service ~/.config/systemd/user/linux-voice-assistant.service
|
||||||
```
|
```
|
||||||
|
|
||||||
**Enable & start:**
|
**Enable & start:**
|
||||||
@@ -144,7 +144,7 @@ mkdir -p ~/.config/systemd/user
|
|||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp ~/linux-voice-assistant/service/user-linux-voice-assistant.service ~/.config/systemd/user/linux-voice-assistant.service
|
cp ~/linux-voice-assistant/service/linux-voice-assistant.service ~/.config/systemd/user/linux-voice-assistant.service
|
||||||
```
|
```
|
||||||
|
|
||||||
**Enable & start:**
|
**Enable & start:**
|
||||||
@@ -239,57 +239,43 @@ The following effects can be selected via the `[State Name] Effect` (select) ent
|
|||||||
| **Fast Blink** | LEDs rapidly turn on and off. |
|
| **Fast Blink** | LEDs rapidly turn on and off. |
|
||||||
| **Spin** | A single LED "spins" around the strip. |
|
| **Spin** | A single LED "spins" around the strip. |
|
||||||
|
|
||||||
**Edit LVA user-mode service:**
|
**Edit LVA config.json file:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl --user edit --force --full linux-voice-assistant
|
nano ~/linux-voice-assistant/linux_voice_assistant/config.json
|
||||||
```
|
```
|
||||||
|
|
||||||
**Add MQTT configuration entries to LVA user-mode service:**
|
**Add MQTT configuration entries to LVA config.json file:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
--mqtt-host <IP_Adress> \
|
"mqtt": {
|
||||||
--mqtt-port 1883 \
|
"host": "192.168.1.2",
|
||||||
--mqtt-username <user_name> \
|
"port": 1883,
|
||||||
--mqtt-password <password> \
|
"username": "mqtt_username",
|
||||||
|
"password": "mqtt_password"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example (Alsa LVA User Mode Service File)**
|
**Example of complete config.json file**
|
||||||
***Note: Change the MQTT values to match your system!***
|
***Note: Change the MQTT values to match your system!***
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
[Unit]
|
{
|
||||||
Description=Linux Voice Assistant
|
"app": {
|
||||||
|
"name": "Linux Voice Assistant"
|
||||||
[Service]
|
},
|
||||||
Type=simple
|
"mqtt": {
|
||||||
WorkingDirectory=/home/pi/linux-voice-assistant
|
"host": "192.168.1.2",
|
||||||
Environment=PYTHONUNBUFFERED=1
|
"port": 1883,
|
||||||
|
"username": "mqtt_username",
|
||||||
ExecStart=/home/pi/linux-voice-assistant/script/run \
|
"password": "mqtt_password"
|
||||||
--name 'Linux Voice Assistant' \
|
}
|
||||||
--mqtt-host 192.168.1.2 \
|
}
|
||||||
--mqtt-port 1883 \
|
|
||||||
--mqtt-username mqtt \
|
|
||||||
--mqtt-password Ch@ngeMe_1st \
|
|
||||||
--wake-word-dir wakewords/openWakeWord \
|
|
||||||
--wake-word-dir wakewords \
|
|
||||||
--stop-model stop \
|
|
||||||
--audio-input-device seeed-2mic-voicecard \
|
|
||||||
--audio-output-device alsa/plughw:CARD=seeed2micvoicec \
|
|
||||||
--debug
|
|
||||||
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
**Enable & start:**
|
**Enable & start:**
|
||||||
```bash
|
```bash
|
||||||
systemctl --user daemon-reload
|
|
||||||
systemctl --user restart linux-voice-assistant.service
|
systemctl --user restart linux-voice-assistant.service
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -311,59 +297,51 @@ This optional configuration support the use of the ReSpeaker 2Mic Grove Port wit
|
|||||||
| 🟡 **Yellow Wire** | GPIO12 (Signal 1) | **DI** (Data Input) |
|
| 🟡 **Yellow Wire** | GPIO12 (Signal 1) | **DI** (Data Input) |
|
||||||
| ⚪ **White Wire** | GPIO13 (Signal 2) | **CI** (Clock Input) |
|
| ⚪ **White Wire** | GPIO13 (Signal 2) | **CI** (Clock Input) |
|
||||||
|
|
||||||
**Edit LVA user-mode service:**
|
**Edit LVA config.json file:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl --user edit --force --full linux-voice-assistant
|
nano ~/linux-voice-assistant/linux_voice_assistant/config.json
|
||||||
```
|
```
|
||||||
|
|
||||||
**Add Grove (GPIO) configuration entries to LVA user-mode service:**
|
**Add Grove (GPIO) configuration entries to LVA config.json file:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
--led-interface gpio \
|
"led": {
|
||||||
--led-data-pin 12 \
|
"led_type": "dotstar",
|
||||||
--led-clock-pin 13 \
|
"interface": "gpio",
|
||||||
|
"clock_pin": 13,
|
||||||
|
"data_pin": 12,
|
||||||
|
"num_leds": 10
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example (Alsa LVA User Mode Service File with MQTT Enabled)**
|
**Example (LVA config.json file with MQTT and Grove Port enabled)**
|
||||||
***Note: Change the GPIO values to match your system!***
|
***Note: Change the GPIO values to match your system!***
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
[Unit]
|
{
|
||||||
Description=Linux Voice Assistant
|
"app": {
|
||||||
|
"name": "Linux Voice Assistant"
|
||||||
[Service]
|
},
|
||||||
Type=simple
|
"mqtt": {
|
||||||
WorkingDirectory=/home/pi/linux-voice-assistant
|
"host": "192.168.1.2",
|
||||||
Environment=PYTHONUNBUFFERED=1
|
"port": 1883,
|
||||||
|
"username": "mqtt_username",
|
||||||
ExecStart=/home/pi/linux-voice-assistant/script/run \
|
"password": "mqtt_password"
|
||||||
--name 'Linux Voice Assistant' \
|
},
|
||||||
--mqtt-host 192.168.1.2 \
|
"led": {
|
||||||
--mqtt-port 1883 \
|
"led_type": "dotstar",
|
||||||
--mqtt-username mqtt \
|
"interface": "gpio",
|
||||||
--mqtt-password Ch@ngeMe_1st \
|
"clock_pin": 13,
|
||||||
--led-interface gpio \
|
"data_pin": 12,
|
||||||
--led-data-pin 12 \
|
"num_leds": 10
|
||||||
--led-clock-pin 13 \
|
}
|
||||||
--wake-word-dir wakewords/openWakeWord \
|
}
|
||||||
--wake-word-dir wakewords \
|
|
||||||
--stop-model stop \
|
|
||||||
--audio-input-device seeed-2mic-voicecard \
|
|
||||||
--audio-output-device alsa/plughw:CARD=seeed2micvoicec \
|
|
||||||
--debug
|
|
||||||
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
**Enable & start:**
|
**Enable & start:**
|
||||||
```bash
|
```bash
|
||||||
systemctl --user daemon-reload
|
|
||||||
systemctl --user restart linux-voice-assistant.service
|
systemctl --user restart linux-voice-assistant.service
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user