OpenVoiceOS / OpenVoiceOS/ovos-utils

pipewire audio ducking

Open
#245 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Python
Stars
6
Forks
13
Avg merge
1d 8m
Merged PRs (30d)
8

Description

from our chats


to enable pulse ducking, set your mycroft.conf

"tts": {"pulse_duck": true}

then sounds played by ovos will set

ENVIRONMENT['PULSE_PROP'] = 'media.role=phone'

if theres some equivalent for pipewire, let me know, or PR welcome https://github.com/OpenVoiceOS/ovos-utils/blob/dev/ovos_utils/sound.py#L22


https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/188
https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/features.html#policies

not sure if 'PULSE_PROP' needs renaming? the functionality seems to be there


issue demonstration:

I'll try to express myself more clearly: A week ago I had Ubuntu 22.04 with pulseaudio as sound server on my desktop system. I have Internet radio running almost all the time with MPD as "radio". At the same time, OVOS was installed on this system as Hivemind-voice-satellite. If I wanted to know how warm it was outside, I said: "Hey Mycroft, what are the readings from the outside thermometer". My Tasmota MQTT skill then retrieved the sensor data from the outdoor thermometer and produced the statement "The temperature on the outdoor thermometer is 22.5 degrees". Before this announcement was made by TTS, the current radio program was automatically turned down and the announcement was output by OVOS at the general volume (ALSA master volume). The radio program was then played again at the original volume. That was very nice and extremely practical. However, I don't know which module or program did this. I have not programmed anything like that.

Now I use Ubuntu 24.04 with pipewire as default sound server. I still have Hivemind-voice-satellite and the MPD radio running at the same time. If I now ask the same question while the radio program is running, the radio program is not turned down but both sound sources are played at the same time with same volume. And then the answer from OVOS is sometimes difficult or impossible to understand.

I hope you can now understand what I mean. It's not particularly serious, but it would be nice if it worked like it did a week ago.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in ovos_utils/sound.py at the referenced line and review how PULSE_PROP is currently set for PulseAudio. Read the linked WirePlumber policy documentation and issue to identify the PipeWire equivalent. Done means OVOS audio ducks concurrent playback under PipeWire while preserving the existing PulseAudio behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.