bug: produces vocoder white noise / radio static with `eliaa.pt

#2
by Haiguezzi - opened

SOLVED

Hi ,

Thank you for open-sourcing Sofelia-TTS for Palestinian Arabic!

I followed the instructions in the repository to run inference.py, but the synthesized .wav file only contains continuous vocoder white noise / radio static rather than intelligible Arabic speech.

Environment:
OS: Windows 10 x64
Python: 3.12
PyTorch: CPU (2.x)
Dependencies: kokoro, misaki, espeakng-loader, phonemizer-fork, soundfile)](Description:

Steps to Reproduce:

  1. Clone hamdallah/Sofelia-TTS-82M.
  2. Run the exact inference command:
    bash python inference.py "مرحبا، كيف حالك؟"
  3. Play the resulting output.wav.

Diagnostic Observations:

  1. Frontend / G2P is working:
    text_to_phonemes("مرحبا كيف حالك اليوم", g2p) produces valid phonemes:

Phonemes: mrʰbˈaː kˈajfa ʰˈaːlik ʔaljˈawm
Tokens: [55, 60, 162, 44, 156, 43, 158]

  1. Audio Tensor Output:
    The vocoder does produce non-zero signal without NaNs
    Audio min: -0.174, max: 0.227, mean: 0.028, std: 0.050, has_nan: False

  2. Weight State Dict Keys:
    Inspecting kokoro_sofelia_82M.pth reveals that tensors still contain the multi-GPU module. prefix:

Missing key(s) in state_dict: "embeddings.word_embeddings.weight"...
Unexpected key(s) in state_dict: "module.embeddings.word_embeddings.weight"...

Even when stripping all module. prefixes cleanly before loading into KModel, the synthesized output from eliaa.pt remains white noise / static.

Thanks for the detailed report — you were right that the weights weren't loading. Besides the module. prefix, the weight-norm layers were saved as parametrizations.weight.original0/1, while kokoro 0.9.x expects weight_g/weight_v; its loader silently falls back to strict=False, so ~180 tensors (most of the vocoder) stayed random, hence the static. Fixed in the latest commit — please re-download kokoro_sofelia_82M.pth and config.json and run inference.py again.

hamdallah changed discussion status to closed

Sign up or log in to comment