serp-ai / bark-with-voice-clone

🔊 Text-prompted Generative Audio Model - With the ability to clone voices
https://serp.ai/tools/bark-text-to-speech-ai-voice-clone-app
Other
3.16k stars 426 forks source link

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

Open angjelkom opened 9 months ago

angjelkom commented 9 months ago

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)
dagshub[bot] commented 9 months ago

Join the discussion on DagsHub!