@Narsil I created a new issue and referenced the file you sent me.

  

      github.com/huggingface/huggingface_hub
  

  
    
  
	  
  

  
    
      Use espnet/kan-bayashi_ljspeech_vits model via inference api 1
    

    
      
        opened 
        
          
        
        Dec 15, 2021
      
      


      
        
          
          danijelpetkovic
        
      
    

    
    
  


  
    https://github.com/huggingface/huggingface_hub/blob/eeeb0d1b352fb3249541bb62f1f5…7f41ae3ab4e0/api-inference-community/docker_images/espnet/app/pipelines/automatic_speech_recognition.py#L8

Hey guys. I tried to use the mentioned model via inference api and the audio that comes as an response is distorted.

When I try to import the model and call it directly it returns a nice audio with nice voice:

```
from espnet2.bin.tts_inference import Text2Speech
from espnet2.utils.types import str_or_none

tag = 'kan-bayashi/ljspeech_vits'
vocoder_tag = "none"

text2speech = Text2Speech.from_pretrained(
  model_tag=str_or_none(tag),
  vocoder_tag=str_or_none(vocoder_tag),
  device="cpu",
  threshold=0.5,
  minlenratio=0.0,
  maxlenratio=10.0,
  use_att_constraint=False,
  backward_window=1,
  forward_window=3,
  speed_control_alpha=1.0,
  noise_scale=0.333,
  noise_scale_dur=0.333,
)

```