question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support: asound config

See original GitHub issue

This might be pretty far out of scope for this platform, but I thought I’d ask anyhow; I have platypush running on several rasberry pi’s, together with an instance of snapclient. I want platypush to lower the volume of the snapclient output upon platypush.message.event.assistant.HotwordDetectedEvent, and then set the volume to whatever it was before, at platypush.message.event.assistant.ConversationEndEvent (or whaterver).

I guess the core of my problem is; how to configure alsa so that I have a separate volume control for my snapclient? Do you by any chance have an example for this? 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
BlackLightcommented, Nov 26, 2019

Then you could move the second music.snapcast.volume directive inside of your ResponseEvent hook, so it resets the volume only after the tts.

The actions in an event hook are indeed executed sequentially, so if you put tts.google.say before music.snapcast.volume the order should be respected. If you want to execute actions in parallel/asynchronously then you can wrap them in a procedure.async.<name> instead.

0reactions
BlackLightcommented, Nov 26, 2019

You can use music.snapcast.status to query the status of a specific host/client and get the volume:

# Getting and storing the volume in an in-memory variable

-
    action: music.snapcast.status
    args:
        host: localhost
        client: your-client

-
    action: variable.mset
    args:
        SNAPCAST_VOLUME: ${config['volume']['percent']}

# Restoring the volume

-
    action: variable.mget
    args:
        name: SNAPCAST_VOLUME

-
    action: music.snapcast.volume
    args:
        host: localhost
        client: your-client
        volume: ${SNAPCAST_VOLUME}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Asoundrc - AlsaProject
Contents · Why asoundrc? · Global view of ALSA config file framework, executive summary · The .asoundrc file format · Where does asoundrc...
Read more >
asound.conf - Github-Gist
Can you help me to create such file in order to modify it ? I believe I need to make the USB audio...
Read more >
Asoundrc - Alsa Opensrc Org
The .asoundrc file (in your home directory) and /etc/asound.conf (for system-wide settings) are the configuration files for ALSA drivers.
Read more >
Advanced Linux Sound Architecture/Configuration examples
The configuration takes place in /etc/asound.conf as mentioned in the main article. None of the following configurations are guaranteed to ...
Read more >
Setting up config for alsa at /etc/asound.conf
I saw that, but could you help clarifyt what's the differnce between pcm and ctl please. Also, how do I define selections for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found