elebumm / RedditVideoMakerBot

Create Reddit Videos with just✨ one command ✨
GNU General Public License v3.0
6.46k stars 1.83k forks source link

[Bug]: GTTS.run() got an unexpected keyword argument 'random_voice' #2079

Closed RequieMa closed 1 month ago

RequieMa commented 1 month ago

Describe the bug

Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the Discord community. │ │ Version: 3.3.0 │ │ Error: GTTS.run() got an unexpected keyword argument 'random_voice' │ │ Config: {'allow_nsfw': True, 'theme': 'dark', 'times_to_run': 1, 'opacity': 0.9, 'storymode': False, 'storymodemethod': 1, 'storymode_max_length': 1000, 'resolution_w': 1080, 'resolution_h': 1920, 'zoom': 1.0, 'channel_name': 'Reddit Tales', │ │ 'background': {'background_video': 'minecraft', 'background_audio': 'lofi', 'background_audio_volume': 0.15, 'enable_extra_audio': False, 'background_thumbnail': False, 'background_thumbnail_font_family': 'arial', 'background_thumbnail_font_size': │ │ 96, 'background_thumbnail_font_color': '255,255,255'}, 'tts': {'voice_choice': 'googletranslate', 'random_voice': True, 'elevenlabs_voice_name': 'Bella', 'elevenlabs_api_key': 'REDACTED', 'aws_polly_voice': 'Matthew', 'streamlabs_polly_voice': │ │ 'Matthew', 'tiktok_voice': 'en_us_001', 'tiktok_sessionid': 'REDACTED', 'python_voice': '1', 'py_voice_num': '2', 'silence_duration': 0.3, 'no_emojis': False}}

Reproduction Steps

With develop branch, choose voice_choice = "googletranslate" in config.toml

Expected behavior

Run without error

Screenshots

No response

System Information

Operating System : Window 10 Python version : Python 3.10.14 App version / Branch : latest develop branch

Checklist

Additional Context

class GTTS:
    def __init__(self):
        self.max_chars = 5000
        self.voices = []

    def run(self, text, filepath):
        tts = gTTS(
            text=text,
            lang=settings.config["reddit"]["thread"]["post_lang"] or "en",
            slow=False,
        )
        tts.save(filepath)

It seems that the GTTS.run needs to add an input

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.

JasonLovesDoggo commented 1 month ago

Fixed in #2078