Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37050f3d87 | ||
|
|
74717609ec | ||
|
|
24ae45896f | ||
|
|
8b29648c50 | ||
|
|
1eba008efe | ||
|
|
d48c545030 | ||
|
|
323ca466ad |
@@ -36,6 +36,14 @@ See `./config.d/rusty-pipe.d`
|
|||||||
|
|
||||||
# Server
|
# Server
|
||||||
|
|
||||||
|
## TTS
|
||||||
|
|
||||||
|
`cd /home/breel/Go/src/gogs.inhome.blapointe.com/tts/larynx.d; bash run.sh`
|
||||||
|
|
||||||
|
## STT
|
||||||
|
|
||||||
|
`cd /home/breel/Go/src/gogs.inhome.blapointe.com/stt.d/whisper-2023; HOTWORDS=/home/breel/Go/src/gogs.inhome.blapointe.com/mayhem-party.d/host.d/config.d/stt.d/hotwords.txt MIC_TIMEOUT=2 URL=http://localhost:17071/ HEADERS=say='what fool said, {{hotword}}, when they said, {{context}}?' python3 ./hotwords.py'
|
||||||
|
|
||||||
## `mayhem-party`
|
## `mayhem-party`
|
||||||
|
|
||||||
### Configs
|
### Configs
|
||||||
@@ -52,7 +60,3 @@ See `./config.d/rusty-pipe.d`
|
|||||||
|
|
||||||
Foreground
|
Foreground
|
||||||
|
|
||||||
## `stt`
|
|
||||||
|
|
||||||
TODO pipe stt detecting relevant strings -> change the `./config.d/mayhem-party.d/remap.d/live.yaml` link -> `SIGUSR1` to `mayhem-party`
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
export DEBUG=true
|
export DEBUG=true
|
||||||
export RAW_UDP=17070
|
|
||||||
export BUTTON_V01=true
|
|
||||||
export WRAP_REFRESH_ON_SIGUSR1=true
|
|
||||||
export MAIN_INTERVAL_DURATION=5ms
|
export MAIN_INTERVAL_DURATION=5ms
|
||||||
|
|
||||||
|
export RAW_UDP=17070
|
||||||
|
|
||||||
|
export PARSE_V01=true
|
||||||
|
export V01_CONFIG=./config.d/mayhem-party.d/v01.yaml
|
||||||
|
|
||||||
|
export WRAP_REFRESH_ON_SIGUSR1=true
|
||||||
|
|
||||||
export OUTPUT_KEYBOARD=false
|
export OUTPUT_KEYBOARD=false
|
||||||
export BUTTON_V01_CONFIG=./config.d/mayhem-party.d/v01.yaml
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
players_offset_4.yaml
|
players_offset_2.yaml
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
feedback:
|
feedback:
|
||||||
addr: :17071
|
addr: :17071
|
||||||
|
ttsurl: http://localhost:15002
|
||||||
users:
|
users:
|
||||||
bel:
|
bel:
|
||||||
player: 2
|
player: 2
|
||||||
@@ -19,3 +20,4 @@ players:
|
|||||||
2: 6
|
2: 6
|
||||||
3: 7
|
3: 7
|
||||||
4: 8
|
4: 8
|
||||||
|
quiet: false
|
||||||
|
|||||||
5
host.d/config.d/stt.d/hotwords.txt
Normal file
5
host.d/config.d/stt.d/hotwords.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
mario
|
||||||
|
party
|
||||||
|
yo
|
||||||
|
win
|
||||||
|
die
|
||||||
@@ -12,4 +12,5 @@ type config struct {
|
|||||||
Players []struct {
|
Players []struct {
|
||||||
Transformation transformation
|
Transformation transformation
|
||||||
}
|
}
|
||||||
|
Quiet bool
|
||||||
}
|
}
|
||||||
|
|||||||
1
src/device/input/parse/v01/testdata/v01.yaml
vendored
1
src/device/input/parse/v01/testdata/v01.yaml
vendored
@@ -17,3 +17,4 @@ players:
|
|||||||
b: "2"
|
b: "2"
|
||||||
x: "3"
|
x: "3"
|
||||||
y: "4"
|
y: "4"
|
||||||
|
quiet: false
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
FlagDebug = os.Getenv("DEBUG") == "true"
|
FlagDebug = os.Getenv("DEBUG") == "true"
|
||||||
FlagParseV01Config = os.Getenv("PARSE_V01_CONFIG")
|
FlagParseV01Config = os.Getenv("V01_CONFIG")
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@@ -60,7 +60,13 @@ func (v01 *V01) Read() []button.Button {
|
|||||||
}
|
}
|
||||||
v01.telemetry(msg)
|
v01.telemetry(msg)
|
||||||
|
|
||||||
return v01.transform(msg).buttons()
|
buttons := v01.transform(msg).buttons()
|
||||||
|
if v01.cfg.Quiet {
|
||||||
|
for i := range buttons {
|
||||||
|
buttons[i].Down = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return buttons
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v01 *V01) telemetry(msg message) {
|
func (v01 *V01) telemetry(msg message) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package v01
|
package v01
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -49,3 +50,43 @@ func TestV01TransformationPipe(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestV01Quiet(t *testing.T) {
|
||||||
|
ctx, can := context.WithCancel(context.Background())
|
||||||
|
defer can()
|
||||||
|
v01 := NewV01(ctx, constSrc(`{"Y":"a", "N":"b"}`))
|
||||||
|
|
||||||
|
v01.cfg.Quiet = false
|
||||||
|
if got := v01.Read(); len(got) != 2 {
|
||||||
|
t.Error(len(got))
|
||||||
|
} else if got[0].Char != 'a' {
|
||||||
|
t.Error(got[0].Char)
|
||||||
|
} else if got[0].Down != true {
|
||||||
|
t.Error(got[0].Down)
|
||||||
|
} else if got[1].Char != 'b' {
|
||||||
|
t.Error(got[1].Char)
|
||||||
|
} else if got[1].Down != false {
|
||||||
|
t.Error(got[1].Down)
|
||||||
|
}
|
||||||
|
|
||||||
|
v01.cfg.Quiet = true
|
||||||
|
if got := v01.Read(); len(got) != 2 {
|
||||||
|
t.Error(len(got))
|
||||||
|
} else if got[0].Char != 'a' {
|
||||||
|
t.Error(got[0].Char)
|
||||||
|
} else if got[0].Down != false {
|
||||||
|
t.Error(got[0].Down)
|
||||||
|
} else if got[1].Char != 'b' {
|
||||||
|
t.Error(got[1].Char)
|
||||||
|
} else if got[1].Down != false {
|
||||||
|
t.Error(got[1].Down)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type constSrc string
|
||||||
|
|
||||||
|
func (c constSrc) Close() {}
|
||||||
|
|
||||||
|
func (c constSrc) Read() []byte {
|
||||||
|
return []byte(c)
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
todo:
|
todo:
|
||||||
- https via home.blapointe and rproxy
|
- https via home.blapointe and rproxy
|
||||||
- tts for when someone said the word via larynx docker + http.get + https://pkg.go.dev/github.com/faiface/beep@v1.1.0/wav
|
|
||||||
- endpoint for v01 to start read-only mode so when hotword spoken, players are dcd
|
- endpoint for v01 to start read-only mode so when hotword spoken, players are dcd
|
||||||
without losing players; press a hotkey that is bound to dolphin emulator pause
|
without losing players; press a hotkey that is bound to dolphin emulator pause
|
||||||
- todo: rotation triggers
|
- todo: rotation triggers
|
||||||
@@ -78,3 +77,5 @@ done:
|
|||||||
- todo: endpoint for v01 to start read-only mode so when hotword spoken, players are
|
- todo: endpoint for v01 to start read-only mode so when hotword spoken, players are
|
||||||
dcd without losing players
|
dcd without losing players
|
||||||
ts: Sat Mar 25 23:16:47 MDT 2023
|
ts: Sat Mar 25 23:16:47 MDT 2023
|
||||||
|
- todo: tts for when someone said the word via larynx docker + http.get + https://pkg.go.dev/github.com/faiface/beep@v1.1.0/wav
|
||||||
|
ts: Sun Mar 26 09:57:02 MDT 2023
|
||||||
|
|||||||
Reference in New Issue
Block a user