Skip to content

FIX Include settings in audio echo, speed, volume and white-noise converter identifiers - #3243

Merged
Roman Lutz (romanlutz) merged 2 commits into
microsoft:mainfrom
ShivamSharma43:fix/audio-converter-identifiers
Oct 17, 2026
Merged

Roman Lutz (romanlutz) merged 2 commits into
microsoft:mainfrom
ShivamSharma43:fix/audio-converter-identifiers

Conversation

@ShivamSharma43

Copy link
Copy Markdown
Contributor

Description

Fixes #3242.

AudioEchoConverter, AudioSpeedConverter, AudioVolumeConverter and AudioWhiteNoiseConverter did not override _build_identifier(). Their identifiers held only the supported input and output types, so all configurations of one class had the same hash and default registry name. For example, AudioSpeedConverter(speed_factor=0.5) and AudioSpeedConverter(speed_factor=2.0) collided, and registering the second one raised ValueError: Instance 'AudioSpeedConverter::4128abe5' already exists.

Each converter now adds output_format and its effect parameters to the identifier, the same way AudioFrequencyConverter does:

  • AudioEchoConverter: delay, decay
  • AudioSpeedConverter: speed_factor
  • AudioVolumeConverter: volume_factor
  • AudioWhiteNoiseConverter: noise_scale

Conversion behavior is unchanged. The default-configuration hashes of these four converters change once, because they now include their parameters. Nothing in the repository pins or registers these hashes: the default converter initializer does not register these converters, and no test pins them.

Tests and Documentation

  • Each of the four test files has three new tests. They check that the identifier params hold the settings, that a non-default setting gets a different hash and both instances register in ConverterRegistry, and that equal settings keep the same hash. On main, 9 of the 13 new tests fail. With this change, all of them pass.
  • pytest tests/unit/converter/test_audio_*_converter.py tests/unit/converter/test_converter.py tests/unit/converter/test_seeded_converter_determinism.py tests/unit/registry tests/unit/backend/test_converter_service.py: 1166 passed, 6 skipped.
  • ruff format, ruff check and ty check pass on the changed files, including the tests. git diff --check is clean.
  • No documentation changes. JupyText not run, since doc/code/converters/2_audio_converters.py does not use identifiers.

🤖 Generated with Claude Code

…nverter identifiers

These four converters did not override _build_identifier(), so every
configuration of a class shared one hash and default registry name.
Include output_format and the effect parameters, as AudioFrequencyConverter
already does.

Fixes microsoft#3242

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 08:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 17, 2026
Merged via the queue into microsoft:main with commit ecf3d23 Oct 17, 2026
97 of 99 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.

BUG: Audio echo, speed, volume and white-noise converters share one identifier across all settings

3 participants