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

CPU support for voice tone extraction #261

Open
Afnanksalal opened this issue Jun 5, 2024 · 0 comments
Open

CPU support for voice tone extraction #261

Afnanksalal opened this issue Jun 5, 2024 · 0 comments

Comments

@Afnanksalal
Copy link

By default OpenVoice uses CUDA for voice tone extraction which is a pain in the ass for CPU runtimes. i can modify the SRC of the se_extractor.py to use a CUDA/CPU switcher to check for drivers but again its pain in the ass to modify the internal dependency code everytime when i start a fresh new codebase. it will be good if yall can add that to the repo so that when i do a new fresh install i dont need to modify the src everytime!

thank you!

model = None
def split_audio_whisper(audio_path, audio_name, target_dir='processed'):
    global model
    if model is None:
        model = WhisperModel(model_size, device="cuda", compute_type="float16")

just add a model argument to the function so that we can choose cpu or gpu with different float values for ie my instance uses float32...

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

No branches or pull requests

1 participant