Skip to content

feat(triggers): Add sound modifiers for voicetriggers#111

Merged
Rushaway merged 39 commits into
srcdslab:masterfrom
Dolly132:main-dolly18
Mar 8, 2026
Merged

feat(triggers): Add sound modifiers for voicetriggers#111
Rushaway merged 39 commits into
srcdslab:masterfrom
Dolly132:main-dolly18

Conversation

@Dolly132
Copy link
Copy Markdown
Contributor

@Dolly132 Dolly132 commented Mar 8, 2026

No description provided.

Dolly132 added 2 commits March 8, 2026 19:11
Remove logging of modifiers before playing audio clip.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the ability to pass runtime audio modifiers (volume, speed, pitch) for voice triggers via inline chat arguments (e.g., !tuturu volume=0.5 pitch=1.2). It restructures the audio parameter configuration from flat top-level keys in VoiceServer to a nested AudioParams object with per-parameter Default, Min, and Max bounds, and introduces a new parse_params method in AudioManager to merge trigger-defined parameters with user-supplied overrides.

Changes:

  • Added parse_params to AudioManager to read and clamp user-supplied audio modifiers from the chat message.
  • Updated VoiceTrigger._func in Commands.py to extract the trigger number from the first word of message[1] and pass the full message to parse_params for modifier parsing.
  • Restructured config.json's VoiceServer section, replacing flat Volume/Speed/Pitch keys with an AudioParams object containing Default, Min, and Max for each parameter.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/torchlight/AudioManager.py Adds parse_params method to resolve audio params from trigger config and chat message modifiers
src/torchlight/Commands.py Updates VoiceTrigger._func to parse trigger number from the first token of the args and pass all args to parse_params
config/config.json Restructures VoiceServer audio params into an AudioParams sub-object with bounds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/torchlight/AudioManager.py Outdated
Comment thread src/torchlight/Commands.py Outdated
Comment thread config/config.json
Comment thread src/torchlight/AudioManager.py Outdated
Comment thread src/torchlight/AudioManager.py Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/torchlight/Commands.py Outdated
Comment thread src/torchlight/AudioManager.py Outdated
Comment thread src/torchlight/AudioManager.py
Comment thread src/torchlight/AudioManager.py
@Rushaway Rushaway merged commit 30c2240 into srcdslab:master Mar 8, 2026
2 checks passed
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.

3 participants