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

XTTS- Torchaudio should use proper backend to load audio #3179

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

gorkemgoknar
Copy link
Contributor

@gorkemgoknar gorkemgoknar commented Nov 9, 2023

Depending on platform and installed libraries, delegate audio loading to torchaudio.

torchaudio<2.1 backend can be selected globally after torchaudio>2.1 backend has changes and ordered backends are used.
Also soundfile>=0.12 made breaking changes and uses now libsndfile packages not platform installed libraries.

This is one of the reasons with problems on mp3 and mp4 files

With this change for getting latents:

  • we can override torchaudio backend (until 2.0.1 at least)
  • Windows users can use mp3 files on loading latest (soundfile>0.11 has support for it and as sox backend is not available by default on windows)
  • can use sox to Load mp4 files on linux
  • can use audiofiles without suffix (as binary file-like objects), which sox/ffmpeg can handle

@gorkemgoknar gorkemgoknar requested a review from erogol November 9, 2023 14:01
@gorkemgoknar gorkemgoknar changed the title Torchaudio should use proper backend to load audio XTTS- Torchaudio should use proper backend to load audio Nov 9, 2023
@erogol erogol merged commit 66a1e24 into dev Nov 9, 2023
52 checks passed
@erogol erogol deleted the Torchaudio-should-chose-audio-backend branch November 9, 2023 15:28
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