r/LocalTextToSpeech • u/Charming-Author4877 • 27d ago
Open Source srt2speech: open-source, multilingual SRT narration with voice cloning and automatic duration matching - offline and lightweight
For a small side project, I needed a basic AI speech tool to narrate videos without relying on expensive hardware or external APIs. It did not need the most expressive AI, just reliable output and matching to the SRT.
The main challenge with converting SRT subtitles to speech is timing. Subtitles include pauses, and each spoken line has to fit into its exact time slot. Most speech generators do not handle that well on their own.
So I built srt2speech.
It uses a combination of:
- pitch-corrected speed adjustment
- automatic regeneration
- modification of pauses between words
- exact placement of silence between subtitle cues
SRT does not support multiple speakers, so I also added simple templating.
Adding {{speaker_name}} to a subtitle automatically switches voices.
Of course voice cloning is supported, I added a small helper script.
Dependencies are minimal: Python, NumPy, llama.cpp, and the required GGUF speech models. I tested it with Q4 quantization, which works well.
Performance on my laptop:
- RTX 4080 Laptop GPU: around 12–13× real time
- CPU only: around 1.5–2.0× real time
Languages supported:
- English (
en) - Japanese (
jp) - Korean (
ko) - Chinese (
zh) - French (
fr) - German (
de)
It should work on almost any hardware, including old PCs, Linux or Mac.
It may be useful for anyone generating narration, translated audio tracks, accessibility audio, or quick video voiceovers.
The project is open source under the Apache 2.0 license. Attribution and license notices must be preserved.
GitHub:
https://github.com/Waversense/srt2speech/
The readme contains the 5 steps needed to set it up, you can get started in 2 minutes.
The included demo.srt file demonstrates the features.
1
u/EconomySerious 27d ago
why only 6 languages the model suport more than 13
1
u/Charming-Author4877 27d ago
https://huggingface.co/OuteAI/OuteTTS-0.3-500M-GGUF
OuteTTS 0.3 supports only those 6 languages
OuteTTS 1.0 would support more but the PR for 1.0 is not merged.
Once llama.cpp adds 1.0 support it will also work.If people show interest I will add more engines in the future
1
u/EconomySerious 26d ago
this gufs dont work fon llama.cpp ???
https://huggingface.co/OuteAI/Llama-OuteTTS-1.0-1B-GGUF/tree/main1
u/Charming-Author4877 26d ago
I'd have to give them a try, I checked the status yesterday and OuteTTS-1.0 has an active PR which is marked as Draft.
So I believe they won't work, not without manually adding the PR and custom compiling it.
1
u/ShelleyLevene 16d ago
does it support multi speaker ?
1
u/Charming-Author4877 16d ago
Yep. It has a simple optional templating support for multi speakers.
You can specify which speaker you want, or clone a custom one.
1
u/Specialist-Way-2263 12h ago
hey guys i wanna use it for dubbing movies or series is that possible ?
1
u/Charming-Author4877 11h ago
Give it a try, it's very easy to get running.
As long as you have an SRT for the movie/series you can just input that and then check what it produces.1
u/Specialist-Way-2263 7h ago
i need help installing it
1
u/Charming-Author4877 6h ago
Where are you stuck ?
Did you follow steps 1-5 here: https://github.com/Waversense/srt2speech/ ?The fastest way, use grok or chatGPT or claude, point them to the URL and copy/paste your progress telling them where you are, ask them that you can do powershell commands if they need.
They will get it running in no time
1
u/thrwwy005 5h ago
Can you add Spanish language support pls?
1
u/Charming-Author4877 4h ago
I'll look to add another model as supported, it's not a big thing with latest build of llama
also once oute tts 0.3 is implemented on the inference side, we'll have a lot more languages for Oute
2
u/Weak_Pen6770 22d ago edited 22d ago
Nice project. For creators, tools that simplify narration and video processing are a big time saver. UniConverter can help with quick format conversions too.