wireplumber wip for stt audio sink

This commit is contained in:
2025-09-20 14:46:13 -04:00
parent bf035507f6
commit 468cbe649b
2 changed files with 76 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
[Unit]
Description=Whisper Combined Audio Setup
After=pipewire.service wireplumber.service
Requires=pipewire.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c 'pw-cli create-node adapter "{ factory.name=support.null-audio-sink node.name=whisper-combined node.description=\\"Whisper Combined Audio\\" media.class=Audio/Sink audio.channels=2 audio.position=[FL,FR] }" && sleep 2 && pw-loopback -P @DEFAULT_SINK@ -C whisper-combined --latency=1024 & pw-loopback -P @DEFAULT_SOURCE@ -C whisper-combined --latency=1024 &'
ExecStop=/bin/bash -c 'pkill -f "pw-loopback.*whisper-combined"'
[Install]
WantedBy=default.target

View File

@@ -0,0 +1,63 @@
{
"wireplumber.components": [
{
"name": "whisper-combined-setup",
"type": "virtual-item/item",
"provides": "virtual-item"
}
],
"wireplumber.settings": {
"node.rules": [
{
"matches": [
{
"node.name": "whisper-combined"
}
],
"actions": {
"update-props": {
"node.description": "Whisper Combined Audio",
"media.class": "Audio/Sink"
}
}
}
]
},
"context.objects": [
{
"factory": "adapter",
"args": {
"factory.name": "support.null-audio-sink",
"node.name": "whisper-combined",
"node.description": "Whisper Combined Audio",
"media.class": "Audio/Sink",
"audio.channels": 2,
"audio.position": "[ FL FR ]"
}
},
{
"factory": "adapter",
"args": {
"factory.name": "support.null-audio-sink",
"node.name": "whisper-speaker-loopback",
"node.description": "Speaker to Whisper Loopback",
"media.class": "Stream/Output/Audio",
"audio.channels": 2,
"stream.capture.sink": "@DEFAULT_SINK@",
"stream.playback.sink": "whisper-combined"
}
},
{
"factory": "adapter",
"args": {
"factory.name": "support.null-audio-sink",
"node.name": "whisper-mic-loopback",
"node.description": "Mic to Whisper Loopback",
"media.class": "Stream/Output/Audio",
"audio.channels": 2,
"stream.capture.sink": "@DEFAULT_SOURCE@",
"stream.playback.sink": "whisper-combined"
}
}
]
}