diff --git a/podcastfy/text_to_speech.py b/podcastfy/text_to_speech.py index 347baf1..87639fb 100644 --- a/podcastfy/text_to_speech.py +++ b/podcastfy/text_to_speech.py @@ -134,7 +134,7 @@ def _generate_audio_segments(self, text: str, temp_dir: str) -> List[str]: for speaker_type, content in [("question", question), ("answer", answer)]: temp_file = os.path.join( temp_dir, f"{idx}_{speaker_type}.{self.audio_format}" - ).replace('\\', '/') # Normalize path separators for cross-platform compatibility + ) voice = provider_config.get("default_voices", {}).get(speaker_type) model = provider_config.get("model") @@ -193,7 +193,9 @@ def get_sort_key(file_path: str) -> Tuple[int, int]: def _setup_directories(self) -> None: """Setup required directories for audio processing.""" self.output_directories = self.tts_config.get("output_directories", {}) - self.temp_audio_dir = self.tts_config.get("temp_audio_dir") + temp_dir = self.tts_config.get("temp_audio_dir", "data/audio/tmp/").rstrip("/").split("/") + self.temp_audio_dir = os.path.join(*temp_dir) + os.makedirs(self.temp_audio_dir, exist_ok=True) # Create directories if they don't exist for dir_path in [ diff --git a/pyproject.toml b/pyproject.toml index 70b5db5..0918914 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "podcastfy" -version = "0.3.3" +version = "0.3.4" description = "An Open Source alternative to NotebookLM's podcast feature: Transforming Multimodal Content into Captivating Multilingual Audio Conversations with GenAI" authors = ["Tharsis T. P. Souza"] license = "Apache-2.0" @@ -39,7 +39,6 @@ sphinx-rtd-theme = "^3.0.1" sphinx-autodoc-typehints = "^2.5.0" nbsphinx = "^0.9.5" edge-tts = "^6.1.12" -langchain-community = "^0.3.2" types-pyyaml = "^6.0.12.20240917" nest-asyncio = "^1.6.0" ffmpeg = "^1.4" @@ -47,6 +46,7 @@ pytest = "^8.3.3" pytest-xdist = "^3.6.1" google-cloud-texttospeech = "^2.21.0" litellm = "^1.52.0" +langchain-community = "^0.3.5" [tool.poetry.group.dev.dependencies]