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

Enable user to exit podcast generation gracefully #74

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

Kostis-S-Z
Copy link
Member

@Kostis-S-Z Kostis-S-Z commented Dec 18, 2024

What's changing

While developing #72 , I implemented this tiny feature because it made testing easier.
Basically, wrap the podcast generation loop in a try/except so that the user can Ctrl+C in the terminal and exit, while saving the generated podcast up that point. I thought maybe its useful to have in general.

How to test it

Steps to test the changes:

  1. pip install -e .
  2. document-to-podcast --from_config example_data/config.yaml
  3. Wait for some text & audio to be generated
  4. Press Ctrl+C to stop the podcast generation before it finishes
  5. Verify that podcast.txt and podcast.wav was created with the podcast generated up to that point

Additional notes for reviewers

[N/A]

I already...

  • Tested the changes in a working environment to ensure they work as expected
  • Added some tests for any new functionality
  • Updated the documentation (both comments in code and under /docs)

@Kostis-S-Z Kostis-S-Z self-assigned this Dec 18, 2024
@Kostis-S-Z Kostis-S-Z marked this pull request as ready for review December 18, 2024 16:09
@Kostis-S-Z Kostis-S-Z requested a review from a team December 18, 2024 16:09
Copy link
Contributor

@stefanfrench stefanfrench left a comment

Choose a reason for hiding this comment

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

@Kostis-S-Z - tested this and worked as expected - approved

@Kostis-S-Z Kostis-S-Z merged commit d88c330 into main Jan 9, 2025
3 checks passed
@Kostis-S-Z Kostis-S-Z deleted the enable-user-interruption branch January 9, 2025 11:30
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