Skip to content

How to run the code sample with GPU on M2?Β #95

@angjelkom

Description

@angjelkom

I have this code sample running, but it says that No GPU being used., how can I fix that?

from bark import SAMPLE_RATE, generate_audio, preload_models
from IPython.display import Audio
from scipy.io.wavfile import write as write_wav

# download and load all models
preload_models()

# generate audio from text
text_prompt = """
     Hallo, mein Name ist Jack. Wie geht's dier?
"""
audio_array = generate_audio(text_prompt, history_prompt="de_speaker_3")

write_wav("./audio2.wav", SAMPLE_RATE, audio_array)

# play text in notebook
Audio(audio_array, rate=SAMPLE_RATE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions