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: add background noise export #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbang2004
Copy link

Description

Add noise extraction functionality to speech enhancement models. This feature allows users to obtain both enhanced speech and extracted noise signals.

Changes

  • Add extract_noise parameter to decode functions
  • Modify model processing pipeline to support noise extraction
  • Update ClearVoice interface to handle noise output
  • Keep original functionality intact for backward compatibility

Implementation Details

  • Added extract_noise boolean parameter (default: False)
  • When extract_noise=True, functions return tuple of (enhanced_audio, noise_audio)
  • When extract_noise=False, functions maintain original behavior
  • Noise is calculated as: original_signal - enhanced_signal

Testing

  • Tested with all speech enhancement models:
    • FRCRN_SE_16K
    • MossFormer2_SE_48K
    • MossFormerGAN_SE_16K
  • Verified output quality and signal consistency

@zexupan
Copy link
Collaborator

zexupan commented Dec 17, 2024

Can you open a new branch for this? Thanks.

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.

2 participants