Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
All solutions
    • All solutions for SpeechKit
    • Fixing the "audio duration should be less than 30s" error in SpeechKit
    • Resolving the "Invalid audio received" error
    • Enabling automated punctuation in the recognized text

In this article:

  • Issue description
  • Solution
  1. SpeechKit
  2. Fixing the "audio duration should be less than 30s" error in SpeechKit

Fixing the «audio duration should be less than 30s» error in SpeechKit

Written by
Yandex Cloud
Updated at September 12, 2023
  • Issue description
  • Solution

Issue descriptionIssue description

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

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

However, the length of the audio file uploaded to SpeechKit might be less than 30 seconds.

SolutionSolution

The cause of the error is that the codec of the file uploaded for recognition is not supported.
For example, for the OGG video container format, the service only supports the Opus codec.

For proper OGG format recognition, upload data encoded by the Opus audio codec.

Was the article helpful?

Previous
All solutions for SpeechKit
Next
Resolving the "Invalid audio received" error
Yandex project
© 2025 Yandex.Cloud LLC