Instructions to use espnet/kan-bayashi_ljspeech_vits with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ESPnet
How to use espnet/kan-bayashi_ljspeech_vits with ESPnet:
from espnet2.bin.tts_inference import Text2Speech model = Text2Speech.from_pretrained("espnet/kan-bayashi_ljspeech_vits") speech, *_ = model("text to generate speech from") - Notebooks
- Google Colab
- Kaggle
just a heads up to anyone who uses the inference api
#5
by 9dubs - opened
the response.content type is FLAC and not MP3 or WAV or encoded binary in JSON. there is no mention of this anywhere so i thought i should leave this here. oh and dont follow the api documentation page, its incorrect.
const arrayBuffer = await response.arrayBuffer()
const blob = new Blob([arrayBuffer], { type: 'audio/flac' })
const blobUrl = URL.createObjectURL(blob)
for someone use jsvascript
thanks for reminding me, here's for someone using python
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
with open('audio.flac', 'wb') as file:
file.write(response.content)