Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
All solutions
    • All solutions for SpeechKit
    • Resolving the `audio duration should be less than 30s` error
    • Resolving the `Invalid audio received` error
    • How to enable automated punctuation in the recognized text

In this article:

  • Issue description
  • Solution
  1. SpeechKit
  2. Resolving the `audio duration should be less than 30s` error

Fixing the audio duration should be less than 30s error

Written by
Yandex Cloud
Updated at December 17, 2025
  • Issue description
  • Solution

Issue descriptionIssue description

When uploading an OGG audio file to the SpeechKit API for recognition, you get this error:

{'error_code': 'BAD_REQUEST', 'error_message': 'audio duration should be less than 30s'}

This happens even if the uploaded audio file is shorter than 30 seconds.

SolutionSolution

The cause of the error is that the codec of the file uploaded for recognition is not supported. For OGG files, SpeechKit only supports the Opus codec.

For proper recognition, you need to upload data encoded by this codec.

Was the article helpful?

Previous
All solutions for SpeechKit
Next
Resolving the `Invalid audio received` error
© 2025 Direct Cursus Technology L.L.C.