Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #839 incorrect clip_timestamps being used in model #842

Merged
merged 2 commits into from
May 17, 2024

Conversation

nonnoxer
Copy link
Contributor

@nonnoxer nonnoxer commented May 16, 2024

Changed the code from updating the TranscriptionOptions class instead of the options object (transcribe.py, lines 493-500), which likely was the cause of the unexpected behaviour of clip_timestamps not updating when calling transcribe multiple times

Original:

TranscriptionOptions.clip_timestamps=[
    float(ts)
    for ts in (
        options.clip_timestamps.split(",")
        if options.clip_timestamps
        else []
    )
]

Updated:

options = options._replace(
  clip_timestamps=[
      float(ts)
      for ts in (
          options.clip_timestamps.split(",")
          if options.clip_timestamps
          else []
      )
  ]
)

Changed the code from updating the TranscriptionOptions class instead of the options object which likely was the cause of unexpected behaviour
@nonnoxer nonnoxer changed the title Fix #839 Fix #839 incorrect clip_timestamps being used in model May 16, 2024
@trungkienbkhn trungkienbkhn merged commit 4acdb5c into SYSTRAN:master May 17, 2024
3 checks passed
din-grogu pushed a commit to din-grogu/faster-whisper-gemini that referenced this pull request Jun 5, 2024
…N#842)

* Fix SYSTRAN#839

Changed the code from updating the TranscriptionOptions class instead of the options object which likely was the cause of unexpected behaviour
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.

None yet

2 participants