Empty audio sample (Kokoro)

#19
by Pendrokar - opened

New bug without any changes made to Gradio. A generated sample is not returned. Still gets saved as cached sample.
Screenshot_2024-12-02-01-47-08-30_e4424258c8b8649f6e67d283a50a2cbc.jpg

@hexgrad seems to be just Kokoro.
hexgrad/kokoro: [WARN] Unable to resample audio

[edit] meaning no one can vote on Kokoro samples as in this Arena it is required to listen to both samples.

Fails before even trying to normalize the sample, code part:
https://huggingface.co/spaces/Pendrokar/TTS-Spaces-Arena/blob/main/app.py#L1196-L1213

Pendrokar changed discussion title from Incomplete audio sample to Empty audio sample (Kokoro)

This does not return a sample for me.

import os
from gradio_client import Client, file

client = Client("hexgrad/kokoro", hf_token=os.getenv('HF_TOKEN'))

result = client.predict(
        text="The juice of lemons makes fine punch.",
        voice="af",
        ps=None,
        speed=1,
        trim=3000,
        use_gpu=False,
        sk=None,
        api_name="/generate"
)
print(result)

(None, '')

[EDIT] Wait holdup, I forgot that only the hardcoded phrases work. Changed the text and it works.

New bug without any changes made to Gradio. A generated sample is not returned. Still gets saved as cached sample.
Screenshot_2024-12-02-01-47-08-30_e4424258c8b8649f6e67d283a50a2cbc.jpg

I can confirm seeing this bug, but didn't know which model it was because I can't even vote.

Kokoro should be fixed and has been tested. @Pendrokar @ecyht2

πŸ† 2024-12-02 18:53:01.058352 ['af'] 60 False 88340

Unfortunately, it seems that empty audios have already been cached. To avoid this in the future, I have changed it to an assert which raises an error instead of returning (and caching) empty audio.

Seems OK now.

Pendrokar changed discussion status to closed

Sign up or log in to comment