# Speech recognition max length

**URL:** <https://discuss.huggingface.co/t/speech-recognition-max-length/114536>\
**Category:** Beginners\
**Created:** [October 29, 2024, 11:09am UTC](https://discuss.huggingface.co/t/speech-recognition-max-length/114536 "2024-10-29T11:09:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![goat123](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@goat123](https://discuss.huggingface.co/u/goat123)\
**Post date:** [October 29, 2024, 11:09am UTC](https://discuss.huggingface.co/t/speech-recognition-max-length/114536/1 "2024-10-29T11:09:09Z")

</div>

When using the voice recognition model, I wonder if the maximum duration is more than 30 seconds and it cannot be used as a memory error.  
There are no documents detailing this.

```auto
MAX_DURATION_IN_SECONDS = 30

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 29, 2024, 11:35am UTC](https://discuss.huggingface.co/t/speech-recognition-max-length/114536/2 "2024-10-29T11:35:26Z")

</div>

I’m not familiar with the details of the model architecture, but most models only support up to 30 seconds, at least for now.  
But I think they just allow you to specify more than 30 seconds, just in case it is possible to extend it in the future.

> **[Reason for 30s audio length · openai/whisper · Discussion #1118](https://github.com/openai/whisper/discussions/1118)**
>
> Hello, I understand that whisper can only access 30s of audio content, what is the reason behind that? Is it because larger than 30s is harder to train? I assume a window larger than 30 seconds sin...

> **[openai/whisper-large-v2 · About length of audio](https://huggingface.co/openai/whisper-large-v2/discussions/72)**
>
> Is there any way, so that we can transcribe the audio having length more than 30 seconds without converting it to chunks and to use through Inference API? Thanks in advance.

> <https://stackoverflow.com/questions/76850304/hugging-face-model-not-transcribing-the-entire-length-of-the-audio-file>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [October 29, 2024, 11:35pm UTC](https://discuss.huggingface.co/t/speech-recognition-max-length/114536/3 "2024-10-29T23:35:46Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
