Instructions to use Supertone/supertonic-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Supertonic
How to use Supertone/supertonic-2 with Supertonic:
from supertonic import TTS tts = TTS(auto_download=True) style = tts.get_voice_style(voice_name="M1") text = "The train delay was announced at 4:45 PM on Wed, Apr 3, 2024 due to track maintenance." wav, duration = tts.synthesize(text, voice_style=style) tts.save_audio(wav, "output.wav")
- Notebooks
- Google Colab
- Kaggle
Performance on Windows?
#13
by jujutechnology - opened
Has anyone tested this on windows machines and not an M4 pro? Can it run cpu only? If not, what's the minimum vram?
Has anyone tested this on windows machines and not an M4 pro? Can it run cpu only? If not, what's the minimum vram?
@jujutechnology
738.13 ms, start to end (this does not include loading model, which takes about a second)
using CPU
import datetime
from supertonic import TTS
import os
os.environ["CUDA_VISIBLE_DEVICES"] = ""
tts = TTS(auto_download=True)
style = tts.get_voice_style_from_path("supertonic/py/assets/voice_styles/Pixie.json") # obv replace with your voice style, this is a custom mixed one
text = "This morning, I took a walk in the park, and the sound of the birds and the breeze was so pleasant that I stopped for a long time just to listen."
start = datetime.datetime.now()
wav, duration = tts.synthesize(text, voice_style=style, speed=1.2)
end = datetime.datetime.now()
length = (start-end).microseconds
print(length/1000, "ms, start to end")
tts.save_audio(wav, "results/out.wav")