Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def _run_transcription_job(self, args: tuple[TranscribeStore, str]) -> None:
job["MediaFormat"] = SUPPORTED_FORMAT_NAMES[format]
duration = ffprobe_output["format"]["duration"]

if float(duration) >= MAX_AUDIO_DURATION_SECONDS:
if float(duration) > MAX_AUDIO_DURATION_SECONDS:
failure_reason = "Invalid file size: file size too large. Maximum audio duration is 4.000000 hours.Check the length of the file and try your request again."
raise RuntimeError()

Expand Down
2 changes: 1 addition & 1 deletion tests/aws/services/transcribe/test_transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def test_transcribe_error_invalid_length(self, transcribe_create_job, aws_client
media_file = os.path.join(tempfile.gettempdir(), "audio_4h.mp3")

run(
f"{ffmpeg_bin} -f lavfi -i anullsrc=r=44100:cl=mono -t 14400 -q:a 9 -acodec libmp3lame {media_file}"
f"{ffmpeg_bin} -f lavfi -i anullsrc=r=44100:cl=mono -t 14401 -q:a 9 -acodec libmp3lame {media_file}"
)
job_name = transcribe_create_job(audio_file=media_file)

Expand Down
Loading