Comments (2)
It is due to a temporary file already being open when creating it and trying to open it again, resulting in a permission error. Since I use Linux, I do not encounter this bug, sorry for this mistake. To work around it, I disabled auto delete, closed the file, and deleted it manually when the operation is done.
edit the file ..\Python\Python311\Lib\site-packages\subtoaudio\subtoaudio.py
or just reinstall the package from git
def subtitle(self, file_path:str):
with tempfile.NamedTemporaryFile(suffix=".srt", delete=False) as temp_file:
temp_filename = temp_file.name
ffmpeg_command = f'ffmpeg -y -i "{file_path}" "{temp_filename}"'
subprocess.run(ffmpeg_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
temp_file.close()
dictionary = self._extract_data_srt(temp_filename)
os.unlink(temp_filename)
return dictionary
if you encounter permission error again on audio section feel free to tell me
from sub-to-audio.
Thank you so much for your prompt response! The permission error is no longer an issue, which is great. However, I'm now facing new challenges with longer SRT files (specifically, ones that are 2 hours long) and SRT files in different languages. I'll post these additional issues for further assistance. Thanks again for your help!
from sub-to-audio.
Related Issues (17)
- option to speed up the voice? HOT 4
- UnicodeDecodeError HOT 1
- Error when using fairseq models HOT 1
- Speed issues HOT 3
- I can't make it rotate HOT 3
- models coqui.ai HOT 2
- https://elevenlabs.io/speech-synthesis HOT 1
- voice conversion error ['NoneType' object has no attribute 'float'] on colab HOT 1
- support for piper-tts? HOT 2
- Doesn't work at Windows HOT 4
- Can't get output file HOT 2
- Faiseq doesn't work HOT 1
- Is it possible to integrate openai's tts model api?
- Include any example HOT 1
- exe version?
- Use Cuda Gpu HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sub-to-audio.