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

Most upvoted comments

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:

Hi, Thanks for the update!!!

I am getting this one now.

NotADirectoryError: [WinError 267] The directory name is invalid: ‘C:\Users\user\OneDrive\Desktop\Projects\docs\env\Lib\site-packages\podcastfy\data\audio\tmp\tmpygd2l0xz\1_question.mp3’

— Reply to this email directly, view it on GitHub https://github.com/souzatharsis/podcastfy/issues/165#issuecomment-2464976965, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTMY3JLAD4S6M77WXLBPCTZ7TG4VAVCNFSM6AAAAABRNNTEHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRUHE3TMOJWGU . You are receiving this because you were mentioned.Message ID: @.***>