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

Resolve -tts edge overwriting file with empty data after written #58

Closed
wants to merge 3 commits into from
Closed

Conversation

ryanboyd
Copy link

Resolves issue #56

A hacky refactoring to facilitate batch processing of an entire directory (and subdirectories) that contain epubs. Essentially, if the "input_file" is a directory, the script will recursively search for .epub files (file extension is currently case sensitive), then iterate over all epubs found and process them using the other parameters provided by the user.
@@ -108,7 +108,6 @@ async def save(
frame_rate=24000,
channels=1
)
audio.export(audio_fname)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe that is useful fix, though not fully sure, need testing

input_folder_root = str(Path(config.input_file))
output_folder_base = config.output_folder

for epub_file in epub_list:
Copy link
Collaborator

Choose a reason for hiding this comment

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

No, sorry.
Maybe you would love to have a folder with a bunch of epubs and want to convert them all in one go, but no. please 1 book at a time, especially if you use OpenAI and each book costs money

@p0n1
Copy link
Owner

p0n1 commented Aug 26, 2024

Thanks for fixing. I already fixed the related issue in #71 by simplifying the related logic. Closing this PR now.

@p0n1 p0n1 closed this Aug 26, 2024
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.

3 participants