# Text to Speech error

**URL:** <https://discuss.huggingface.co/t/text-to-speech-error/44506>\
**Category:** Beginners\
**Created:** [June 25, 2023, 6:47pm UTC](https://discuss.huggingface.co/t/text-to-speech-error/44506 "2023-06-25T18:47:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PriNova](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@PriNova](https://discuss.huggingface.co/u/PriNova)\
**Post date:** [June 25, 2023, 6:47pm UTC](https://discuss.huggingface.co/t/text-to-speech-error/44506/1 "2023-06-25T18:47:03Z")

</div>

Hello again,

every time I try to use the Text-to-Speech examples through the API in the task section of HF I got an error message response.

For the espnet/lan-bayashi model I tried the Inference API like in this example from the model directly:

````auto
import requests

API_URL = "https://api-inference.huggingface.co/models/espnet/kan-bayashi_ljspeech_vits"
headers = {"Authorization": "Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}

def query(payload):
	response = requests.post(API_URL, headers=headers, json=payload)
	return response.json()
	
output = query({
	"inputs": "The answer to the universe is 42",
})```

I got as response : {'error': ['Error in 'inputs': Malformed soundfile']}

Really? Text 2 Speech is used to be text as input and soundfile as output.

How can this happen? Also the facebook text 2 speech engine errors out with "{'error': 'text-to-speech is not a valid pipeline'}"

I mean, this are examples directly brought by HF on the task pages.
````
