Skip to content

Commit

Permalink
Merge pull request #63 from bcongdon/main
Browse files Browse the repository at this point in the history
Only include selected chapters in the character/cost estimate
  • Loading branch information
Bryksin authored Aug 24, 2024
2 parents ecdbf1f + a628de8 commit 4ea2e25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions audiobook_generator/core/audiobook_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def run(self):
logger.info(f"Converting chapters from {self.config.chapter_start} to {self.config.chapter_end}.")

# Initialize total_characters to 0
total_characters = get_total_chars(chapters)
logger.info(f"✨ Total characters in selected book: {total_characters} ✨")
total_characters = get_total_chars(chapters[self.config.chapter_start - 1:self.config.chapter_end])
logger.info(f"✨ Total characters in selected book chapters: {total_characters} ✨")
rough_price = tts_provider.estimate_cost(total_characters)
print(f"Estimate book voiceover would cost you roughly: ${rough_price:.2f}\n")

Expand Down

0 comments on commit 4ea2e25

Please sign in to comment.