Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: automatically turn volume down when people talks #1096

Conversation

xytxxx
Copy link
Contributor

@xytxxx xytxxx commented Sep 15, 2024

This PR introduces a new feature that automatically lowers the music volume when users in the voice channel are speaking. The feature can be turned on/off through environment variables (default is off), and the target volume of when people are talking is also configurable (default is 70%).

Tested in personal Discord and found 70% volume leads to subtly better experience.

  • [✓] I updated the changelog

@xytxxx xytxxx force-pushed the auto-turn-voice-down-when-people-speaks branch from 9bd3b03 to aae9825 Compare September 15, 2024 21:53
@codetheweb
Copy link
Collaborator

codetheweb commented Sep 15, 2024

📦 🤖 A new release has been made for this pull request.

To play around with this PR, pull ghcr.io/museofficial/muse:pr-1096.

Images are available for x86_64 and ARM64.

Latest commit: 33aefef

@Codixer Codixer self-assigned this Oct 29, 2024
@Codixer
Copy link
Contributor

Codixer commented Oct 30, 2024

@Hazzajenko Would you be able to test and confirm this feature still works?

@Hazzajenko
Copy link
Contributor

@Hazzajenko Would you be able to test and confirm this feature still works?

Sure I'll have a look after work today

Updated env variables with discord commands.
Removed obsolete TURN_DOWN_VOLUME_WHEN_PEOPLE_SPEAK and TURN_DOWN_VOLUME_WHEN_PEOPLE_SPEAK_TARGET environment variables and corresponding class properties as we will use the discord commands instead.
Changed the section to mention the discord commands rather than the env variables.
…eakTarget` fields to the `Setting` model in Prisma
@Hazzajenko
Copy link
Contributor

I've updated the volume reduction feature to align with the standard approach of addons in muse:

  • Removed the environment variables (TURN_DOWN_VOLUME_WHEN_PEOPLE_SPEAK and TURN_DOWN_VOLUME_WHEN_PEOPLE_SPEAK_TARGET) in favor of Discord slash commands
  • Added two new config commands:
    • /config set-reduce-vol-when-voice to toggle the feature
    • /config set-reduce-vol-when-voice-target to set the reduction percentage (0-100)
  • Settings are now stored in Prisma DB like other bot configurations

@Codixer Codixer changed the base branch from master to feature/lower-volume-when-talking November 4, 2024 12:31
@Codixer
Copy link
Contributor

Codixer commented Nov 4, 2024

LGTM

@Codixer Codixer merged commit d4e1124 into museofficial:feature/lower-volume-when-talking Nov 4, 2024
4 checks passed
@codetheweb
Copy link
Collaborator

🚀 Released in Release v2.10.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants