Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with Inconsistent Paths #182

Open
OptrixAU opened this issue Nov 17, 2024 · 6 comments
Open

Problems with Inconsistent Paths #182

OptrixAU opened this issue Nov 17, 2024 · 6 comments

Comments

@OptrixAU
Copy link

I'm getting an error and an unexpected behaviour because of paths.

When running, Podcastfy will store some of the temporary files (ie. the transcript) in the local directory, but others (ie. the audio files) in the library directory of your Python installation. It seems that the folder the library considers the 'working' folder changes half-way through execution.

This also impacts local FFMPEG installations. PyDub won't complain about FFMPEG if you've got it in the same folder as your .PY file....but by the time it tries to combine each of the audio samples together into one MP3, it's not using the scripts local directory anymore, which means FFMPEG can't be found. This forces Windows users to copy the executables into somewhere on the PATH.

I'd expect this to be more consistent - and ideally, not store any temporary files in the library folder(s). If anything goes wrong (such as FFMPEG not being found), the unprocessed files remain in the library folder, cluttering everything up.

@chalg
Copy link

chalg commented Dec 13, 2024

I think I have a similar issue, the transcript and individual .mp3 files were created:
Transcript saved to [./data/transcripts\transcript_53b845ca80f4405295ba0e0fb88453a7.txt](https://file+.vscode-resource.vscode-cdn.net/c%3A/temp/podcastfy/data/transcripts/transcript_53b845ca80f4405295ba0e0fb88453a7.txt) [c:\Users\uqgchal2\AppData\Local\anaconda3\envs\podcastfy\Lib\site-packages\pydub\utils.py:198](file:///C:/Users/uqgchal2/AppData/Local/anaconda3/envs/podcastfy/Lib/site-packages/pydub/utils.py:198): RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning) Error merging audio files: [WinError 2] The system cannot find the file specified Error converting text to speech: [WinError 267] The directory name is invalid: 'c:\\Users\\uqgchal2\\AppData\\Local\\anaconda3\\envs\\podcastfy\\Lib\\site-packages\\podcastfy\\data\\audio\\tmp\\tmpxxr9_jd7\\1_question.mp3' 2024-12-14 09:23:32,735 - podcastfy.client - ERROR - An error occurred in the process_content function: [WinError 267] The directory name is invalid: 'c:\\Users\\uqgchal2\\AppData\\Local\\anaconda3\\envs\\podcastfy\\Lib\\site-packages\\podcastfy\\data\\audio\\tmp\\tmpxxr9_jd7\\1_question.mp3' 2024-12-14 09:23:32,736 - podcastfy.client - ERROR - An error occurred: [WinError 267] The directory name is invalid: 'c:\\Users\\uqgchal2\\AppData\\Local\\anaconda3\\envs\\podcastfy\\Lib\\site-packages\\podcastfy\\data\\audio\\tmp\\tmpxxr9_jd7\\1_question.mp3'

@Japanjot1
Copy link

Having the same issue. Any help is welcome.

@souzatharsis
Copy link
Owner

souzatharsis commented Dec 28, 2024 via email

@Japanjot1
Copy link

Yep. I'm running this on windows.

@Japanjot1
Copy link

I guess I figured it out. Had to install Ffmpeg manually. Now it works perfect.

@chalg
Copy link

chalg commented Dec 29, 2024

I guess I figured it out. Had to install Ffmpeg manually. Now it works perfect.

Did you have to uninstall ffmpeg first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants