-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The RedditVideoMakerBot has been updated to version 3.2, bringing exciting new features and bug fixes. Introducing **ElevenLabs TTS** for high-quality audio. Enjoy **background audio** and **random voices per comment**. Run the bot with one click using the **bat file**. Use the **zoom setting** for bigger text. Bug fixes include video downloader improvements, random story mode fix, updated dependencies, code optimizations, text size adjustments, enhanced Reddit credentials validation, and translator fixes. Enjoy the new features and **thanks to all contributors**!
- Loading branch information
1 parent
f2d89a1
commit 0ea74e4
Showing
24 changed files
with
539 additions
and
222 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import random | ||
|
||
from elevenlabs import generate, save | ||
|
||
from utils import settings | ||
|
||
voices = [ | ||
"Adam", | ||
"Antoni", | ||
"Arnold", | ||
"Bella", | ||
"Domi", | ||
"Elli", | ||
"Josh", | ||
"Rachel", | ||
"Sam", | ||
] | ||
|
||
|
||
class elevenlabs: | ||
def __init__(self): | ||
self.max_chars = 2500 | ||
self.voices = voices | ||
|
||
def run(self, text, filepath, random_voice: bool = False): | ||
if random_voice: | ||
voice = self.randomvoice() | ||
else: | ||
voice = str( | ||
settings.config["settings"]["tts"]["elevenlabs_voice_name"] | ||
).capitalize() | ||
|
||
if settings.config["settings"]["tts"]["elevenlabs_api_key"]: | ||
api_key = settings.config["settings"]["tts"]["elevenlabs_api_key"] | ||
else: | ||
raise ValueError( | ||
"You didn't set an Elevenlabs API key! Please set the config variable ELEVENLABS_API_KEY to a valid API key." | ||
) | ||
|
||
audio = generate( | ||
api_key=api_key, text=text, voice=voice, model="eleven_multilingual_v1" | ||
) | ||
save(audio=audio, filename=filepath) | ||
|
||
def randomvoice(self): | ||
return random.choice(self.voices) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
boto3==1.24.24 | ||
botocore==1.27.24 | ||
gTTS==2.2.4 | ||
boto3==1.26.142 | ||
botocore==1.29.142 | ||
gTTS==2.3.2 | ||
moviepy==1.0.3 | ||
playwright==1.23.0 | ||
praw==7.6.1 | ||
playwright==1.34.0 | ||
praw==7.7.0 | ||
prawcore~=2.3.0 | ||
pytube==12.1.0 | ||
requests==2.28.1 | ||
rich==13.3.1 | ||
requests==2.31.0 | ||
rich==13.3.5 | ||
toml==0.10.2 | ||
translators==5.3.1 | ||
translators==5.7.6 | ||
pyttsx3==2.90 | ||
Pillow~=9.4.0 | ||
tomlkit==0.11.4 | ||
Flask==2.2.2 | ||
Pillow==9.5.0 | ||
tomlkit==0.11.8 | ||
Flask==2.3.2 | ||
clean-text==0.6.0 | ||
unidecode==1.3.2 | ||
spacy==3.4.1 | ||
torch==1.12.1 | ||
transformers==4.25.1 | ||
ffmpeg-python==0.2.0 | ||
unidecode==1.3.6 | ||
spacy==3.5.3 | ||
torch==2.0.1 | ||
transformers==4.29.2 | ||
ffmpeg-python==0.2.0 | ||
elevenlabs==0.2.16 | ||
yt-dlp==2023.3.4 |
Oops, something went wrong.