#274·OmniVoice

Make torchaudio optional — only used for resampling at inference time

Author: quarza-pixelCreated Sep 26, 2026Updated Sep 26, 2026
Labelsenhancement

Checks

  • This template is only for feature request.
  • I have thoroughly reviewed the project documentation but couldn't find any relevant information that meets my needs.
  • I have searched for existing issues, including closed ones, and found not discussion yet.
  • I am using English to submit this issue to facilitate community communication.

1. Is this request related to a challenge you're experiencing? Tell us your story.

ComfyUI removed its torchaudio dependency on Sep 22, 2026 (https://github.com/Comfy-Org/ComfyUI/pull/16457), since there is no stable torchaudio build for CUDA 13.2 (cu132). New environments built around recent PyTorch/CUDA versions will increasingly lack torchaudio, and all ComfyUI nodes wrapping OmniVoice rely on the omnivoice package.

Current situation (omnivoice 0.2.1) torchaudio is imported at module level, so import omnivoice fails without it:

  • omnivoice/models/omnivoice.py, line 43: import torchaudio
  • omnivoice/utils/audio.py, line 33: import torchaudio

However, in the inference path it is only used for resampling:

  • omnivoice/models/omnivoice.py, line 767: torchaudio.functional.resample(...)
  • omnivoice/utils/audio.py, lines 84 and 117: torchaudio.functional.resample(...)

Other uses (e.g. torchaudio.compliance.kaldi.fbank) are in omnivoice/scripts/ (data preparation / denoising), not needed for inference.

2. What is your suggested solution?

Replace torchaudio.functional.resample in the inference path with a resampler that is already available through existing dependencies, e.g. librosa.resample (librosa is already a dependency, and pulls in soxr), or soxr directly. Alternatively, import torchaudio lazily inside the functions that need it, or behind a try/except with a fallback.

torchaudio could then move to an optional extra (for the training/data scripts), and import omnivoice would work in torchaudio-free environments.

3. Additional context or comments

I haven't tested these changes myself, but I'm happy to help test a fix. Thanks!

4. Can you help us with this feature?

  • I am interested in contributing to this feature.