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

includes language language as part of the output path extension #97

Open
drzraf opened this issue May 25, 2024 · 0 comments
Open

includes language language as part of the output path extension #97

drzraf opened this issue May 25, 2024 · 0 comments

Comments

@drzraf
Copy link

drzraf commented May 25, 2024

Using auto-language + output-dir, a subtitle named after the original is created (at the same location independently of the detection options)

output_path = os.path.join(
self.output_dir, audio_basename + "." + self.extension
)

In situation where language can't predicted, a user could legitimately prefer subtitles to be created like <filename>.<detected-language>.srt (foo.de.srt, foo.en.srt) according to the language ctranslate2 detected.
This would avoid subsequent override later on when --language=... is passed and keep track of the language when operating over a batch of files from different sources.

I suggest to include an option to handle this scenario.

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

No branches or pull requests

1 participant