feat: Robust Audio I/O, JSON-based i18n & Windows Portability Enhancements#68
Open
RafaelGodoyEbert wants to merge 1 commit into
Open
feat: Robust Audio I/O, JSON-based i18n & Windows Portability Enhancements#68RafaelGodoyEbert wants to merge 1 commit into
RafaelGodoyEbert wants to merge 1 commit into
Conversation
Collaborator
|
Thanks for this PR. In the recent update, I switched the audio I/O from torchaudio to soundfile+librosa, which is similar to the Robust Audio I/O you proposed. The demo page is only intended as a simple demonstration, and I think Chinese + English support will satisfy most users. Regarding Windows portability, I noticed this script contains many hardcoded arguments and assumptions, so it may not be suitable for merging into the master branch. However, if you wish to implement and maintain a Windows version of OmniVoice, you can create your own repository and list it under the community projects section. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the
RuntimeError: Could not load libtorchcodecencountered by Windows users, fully implements internationalization (i18n) for the UI/CLI, and adds a standalone Windows batch launcher to ensure dependency isolation and smooth GPU deployment. It is fully integrated with the latest upstream changes (--no-asr, Voice Clone Instruct, andtorchaudio.loadfixes).Part 1: Robust Audio I/O (TorchCodec Fallback)
The Problem
On Windows, operations like
torchaudio.save()ortorchaudio.load()often crash withRuntimeErrordue to missing or misconfiguredtorchcodec/ FFmpeg dynamic libraries.The Solution
save_audioinsideomnivoice/utils/audio.pythat leverages Torchaudio but cleanly falls back tosoundfileupon environment errors.backend="soundfile"fix inload_audio(), whilst beefing up the exception blockers to catchImportErrorand gracefully revert to PyDub+FFmpeg if any PyTorch audio backend fails.Part 2: JSON-based Internationalization (i18n)
Full interface localization using a lightweight, native
.jsonarchitecture underomnivoice/locales/.Key Features
pt_BR.json,en.json,zh.json). Anyone can expand support by adding a single file, eliminating the need for complex.potoolchains."portuguese accent") to maintain core generation stability.--langargument acrossdemo.py,infer.py, andinfer_batch.py. Everything (including console logs and argument help blocks) wraps seamlessly inside the_()dictionary handler.Part 3: Windows Portability (OmniVoice.bat)
A massive quality-of-life feature for Windows users trying to test the model seamlessly.
OmniVoice.batautomated Windows startup script.uvcache downloads permanently inside the project subfolders to avoid fragmenting the user's globalC:drive state.Verification
--no-asrparameters and the newly reintroduced "Instruct" textboxes in Voice Clone.uv run omnivoice/cli/demo.py --lang pt_BR.