open-mmlab / Amphion

Amphion (/æmˈfaɪən/) is a toolkit for Audio, Music, and Speech Generation. Its purpose is to support reproducible research and help junior researchers and engineers get started in the field of audio, music, and speech generation research and development.
https://openhlt.github.io/amphion/
MIT License
4.41k stars 373 forks source link

[BUG]: FACodec outputs noise #173

Closed lifeiteng closed 5 months ago

lifeiteng commented 5 months ago

Describe the bug

I follow the README in https://github.com/open-mmlab/Amphion/tree/main/models/codec/ns3_codec but the reconstructed wav is very different from the original audio, the prosody codes are all 905 & 653.

>>> vq_id[:1]
tensor([[[653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          905, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 905, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 905, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 905, 905, 653, 905, 905, 905, 905, 905, 653,
          653, 905, 905, 653, 653, 653, 653, 905, 905, 653, 905, 905, 653, 653,
          905, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 905,
          653, 905, 653, 653, 653, 653, 905, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 905, 905,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          905, 653, 653, 905, 905, 653, 905, 905, 653, 653, 653, 653, 905, 653,
          905, 653, 653, 905, 905, 905, 905, 653, 653, 653, 653, 905, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 905, 905, 905, 905, 653, 905, 653, 653, 653, 653, 905, 653,
          653, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 905, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 905, 653, 653, 653, 653, 905, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 905, 653, 653, 653, 653, 653, 905,
          905, 653, 905, 905, 905, 653, 653, 905, 905, 905, 905, 905, 653, 653,
          653, 653, 653, 653, 905, 905, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 905, 653, 653, 905, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 905, 905, 905, 905,
          905, 653, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 905, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 905, 905,
          653, 653, 653, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 905, 653, 653, 905, 653, 653, 653, 653, 905, 905,
          905, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 905, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 905, 653, 905, 653, 653, 653, 653,
          653, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 905, 653, 905,
          653, 653, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 905, 653, 905, 653, 905, 905, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 905, 905, 653, 653, 653, 653, 653, 905, 905,
          905, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 905, 905, 653, 653, 905, 653, 905, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 905, 905, 905,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 905, 905, 653, 905, 653,
          653, 653, 905, 905, 905, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653,
          653, 653, 653, 653, 653, 653, 653, 653, 653]]])
>>>

How To Reproduce

Steps to reproduce the behavior: FACodec Usage

Screenshots

original wav

截屏2024-03-30 23 08 21

reconstructed wav

截屏2024-03-30 23 08 30
lifeiteng commented 5 months ago

I re-ran it and there was no problem, the rebuild was fine.