Feature request: volume parameter for aplay
GitHub issues - opened
github at alsa-project.org
Fri Jul 10 13:25:38 CEST 2020
alsa-project/alsa-utils issue #45 was opened from flatsiedatsie:
I am currently in a situation where I'm trying to play a notification sound when a privacy friendly voice control system hears its wake word. Specifically, it's the [Voco addon](https://github.com/createcandle/voco) for the [Mozilla WebThings Gateway](https://webthingsgateway.com/), an open source smart home controller.
Up till now I used `aplay` for this. But I need/want to support a ReSpeaker USB microphone, and that device doesn't have a simple volume control. Unfortunately addons are not allowed to make changes to asound.conf (which could add softvol) or install something like Pulse audio to mitigate this situation, as those changes could affect other addons of the system.
My current solution has been to switch to a different available audio player, `ffplay`. It has a `-volume` parameter.
Having a `-volume` option actually works out quite nicely, as it allows sounds to be played at relative volume to each other. For example, I can play a music stream at 40% volume, while setting the audio feedback from the voice control to be louder so it can always be heard over the music.
The downside of ffplay is that it's slow to start up. It can take up to a second or two. Aplay's responses were pretty much instant, which I now realise was really valuable and important.
I'd prefer to switch back to aplay, but I'd need to somehow get aplay to output audio at a relative volume.
Is this possible somehow? And if not, would it be an idea to add this feature to aplay?
Issue URL : https://github.com/alsa-project/alsa-utils/issues/45
Repository URL: https://github.com/alsa-project/alsa-utils
More information about the Alsa-devel
mailing list