Skip to content

fix(cli): validate the complete TTS speed argument - #5264

Merged
jrusso1020 merged 1 commit into
heygen-com:mainfrom
user-github-me:fix/tts-speed-argument-validation
Oct 8, 2026
Merged

jrusso1020 merged 1 commit into
heygen-com:mainfrom
user-github-me:fix/tts-speed-argument-validation

Conversation

@user-github-me

Copy link
Copy Markdown
Contributor

hyperframes tts --speed accepts values below the stated 0.1 minimum and silently reads numeric prefixes from inputs such as 1.5junk or 1 2. An explicitly empty value also falls back to 1.0, starting synthesis instead of reporting invalid input.

Parse the complete argument and require a finite value within 0.1–3.0. Apply the default only when the flag is omitted.

Validation: five regression cases fail on main; 49 TTS command and synthesis tests passed. The built CLI rejects below-range, trailing-text, and empty speeds before Python/model setup. CLI build/typecheck, repository lint, formatting, and test reachability passed.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small but real. --speed accepted values below the documented 0.1 minimum, silently used the numeric prefix of input like 1.5junk, and treated an empty value as 1.0. Parsing the whole value and checking the range the error message already states fixes all three. The tests fail on main and pass here.

— Rames

@jrusso1020
jrusso1020 enabled auto-merge October 8, 2026 19:56
@jrusso1020
jrusso1020 added this pull request to the merge queue Oct 8, 2026
Merged via the queue into heygen-com:main with commit 5a7ada6 Oct 8, 2026
81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants