Skip to content

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

Closed

Description

@RequieMa

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

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.

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

Activity

  1. added
    bug
    on Jun 26, 2024
  2. github-actions commented on Jul 3, 2024

    @github-actions
    Contributor

    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.

  3. JasonLovesDoggo commented on Jul 4, 2024

    @JasonLovesDoggo
    Collaborator

    Fixed in #2078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions