# Using Inference API with large audio files

**URL:** <https://discuss.huggingface.co/t/using-inference-api-with-large-audio-files/17847>\
**Category:** Beginners\
**Created:** [May 11, 2022, 9:10pm UTC](https://discuss.huggingface.co/t/using-inference-api-with-large-audio-files/17847 "2022-05-11T21:10:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![murdockthedude](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@murdockthedude](https://discuss.huggingface.co/u/murdockthedude)\
**Post date:** [May 11, 2022, 9:10pm UTC](https://discuss.huggingface.co/t/using-inference-api-with-large-audio-files/17847/1 "2022-05-11T21:10:17Z")

</div>

Is there currently a way for us to use the Inference API for audio tasks with larger audio files? At the moment it appears limited to very short audio files or otherwise it returns a 413 payload too large error. The docs are silent on this question but our use case requires running inference on long audio files so if this isn’t supported then the API becomes a non-option for us.

Given that [the docs specify](https://huggingface.co/docs/api-inference/detailed_parameters) the request must consist of a binary payload, I’m inclined to think inference on long audio files isn’t presently supported?

We have the API working for a short test file. But a 9 minute FLAC file is getting rejected by the server as too large (and our use-case is up to 60 minute files)

Thought someone here might know! Thanks.

---

<div class="post-metadata">

**Author:** ![murdockthedude](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@murdockthedude](https://discuss.huggingface.co/u/murdockthedude)\
**Post date:** [May 12, 2022, 6:02pm UTC](https://discuss.huggingface.co/t/using-inference-api-with-large-audio-files/17847/2 "2022-05-12T18:02:27Z")

</div>

Anyone have some insight on this? 👀 👀

Thanks!

---

<div class="post-metadata">

**Author:** ![rbt073](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@rbt073](https://discuss.huggingface.co/u/rbt073)\
**Post date:** [June 3, 2022, 7:46pm UTC](https://discuss.huggingface.co/t/using-inference-api-with-large-audio-files/17847/3 "2022-06-03T19:46:36Z")

</div>

I’m getting the same 413 message on all Speech Separation models. I tried both 8k and 16k sampling frequency. Hope to get some confirmation about this.

---

<div class="post-metadata">

**Author:** ![skorkmaz88](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/skorkmaz88/32/5373_2.png) [@skorkmaz88](https://discuss.huggingface.co/u/skorkmaz88)\
**Post date:** [July 14, 2022, 5:22pm UTC](https://discuss.huggingface.co/t/using-inference-api-with-large-audio-files/17847/4 "2022-07-14T17:22:52Z")

</div>

I am facing a similar probelm for image object recognition case

---

<div class="post-metadata">

**Author:** ![Bobisat12](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bobisat12/32/6084_2.png) [@Bobisat12](https://discuss.huggingface.co/u/Bobisat12)\
**Post date:** [September 16, 2022, 10:07am UTC](https://discuss.huggingface.co/t/using-inference-api-with-large-audio-files/17847/5 "2022-09-16T10:07:44Z")

</div>

Hi there,

My name is Julien, from France.

I also try to post large audio files to a speech to text API hosted here, and get the 413 error message.

Did anyone find a solution or get an info from the tech team?

Best Regards,

Julien
