podcastfy: [Windows] Critical Error when generation audio
I am running issue when generating audio. Here’s my code.
%pip install ipython
from IPython.display import Audio, display
# Generate transcript only
from podcastfy.client import generate_podcast
user_input_text = "Some text"
def embed_audio(audio_file):
"""
Embeds an audio file in the notebook, making it playable.
Args:
audio_file (str): Path to the audio file.
"""
try:
display(Audio(audio_file))
print(f"Audio player embedded for: {audio_file}")
except Exception as e:
print(f"Error embedding audio: {str(e)}")
audio_file_path = generate_podcast(text=user_input_text, transcript_only=True)
audio_file_from_transcript = generate_podcast(
transcript_file=audio_file_path,
tts_model="elevenlabs",
# api_key_label="elevenlabs"
)
embed_audio(audio_file_from_transcript)
Everything works fine, The audio files are being generated, but then I get this error.
NotADirectoryError [WinError 267] The directory name is invalid: 'data/audio/tmp/tmpvx99hy0y\\1_question.mp3'
Anyone know how to troubleshoot this? I am on windows11
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (5 by maintainers)
Commits related to this issue
- #165 Fixed audio generation in Windows OS issue: Normalize path separators for cross-platform compatibility — committed to souzatharsis/podcastfy by deleted user 2 years ago
- [Windows] Critical Error when generation audio #165 — committed to souzatharsis/podcastfy by deleted user 2 years ago
- [Windows] Critical Error when generation audio #165 — committed to souzatharsis/podcastfy by deleted user 2 years ago
I see tempFile when trying to cleanup temporary files created is trying to delete a file path as if it was a directory path. I’ll try and fix that later.
Thank you so much for your patience.
This really calls out for docker images for multiple OS support. http://linkedin.com/in/tharsissouza
On Fri, Nov 8, 2024 at 12:01 PM Adi @.***> wrote: