podcastfy
podcastfy copied to clipboard
Refactoring enabling the creation of a lower level API with the Podcast Class
Creation of the Podcast
allowing a fine level of control in the podcast creation as a step machine.
Works with tts and llm engines abiding to simple Abstract Based Classes to ease up future integrations.
tts engines can be both async or sync. If an async tts engine is used, then audio processing takes place in parallel (and in thread for sync engines). It's possible to control the number of jobs in both case.
Introduction to other classes such as Character
, Transcript
, AudioManager
The behavior of process_content is unchanged and the tests pass.
Created unit tests for the Podcast class (with mocked tts and llm engines) Added tests for transcript handling, saving, loading and cleaning.
Some code is made obsolete :
-
text_to_speech.py
for which the business logic has been put in different places -
process_links
that would be replaced by the body ofprocess_links_v2
which uses thePodcast
class). I preferred to wait to the last moment to commit their deletion.
Many things could be improved, but this PR is already too large and should be under discussion beforehand anyway.