Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Google TTS Failed #2232

Closed
2 tasks done
Shivansh-Pandey opened this issue Jan 13, 2025 · 3 comments
Closed
2 tasks done

[Bug]: Google TTS Failed #2232

Shivansh-Pandey opened this issue Jan 13, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@Shivansh-Pandey
Copy link

Describe the bug

I am using Google transalte as TTS. Config -

[settings.tts]
voice_choice = "googletranslate"
random_voice = true
elevenlabs_voice_name = "Adam"
elevenlabs_api_key = ""
aws_polly_voice = "Matthew"
streamlabs_polly_voice = "Matthew"
tiktok_voice = "en_us_001"
tiktok_sessionid = ""
python_voice = "1"
py_voice_num = "2"
silence_duration = 0.3
no_emojis = false

It throws error -


┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ on the 1st iteration of 1                                                                                                                                 │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Logging into Reddit.
Version 7.7.1 of praw is outdated. Version 7.8.1 was released Friday October 25, 2024.
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Getting subreddit threads...                                                                                                                              │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Using subreddit: r/UnresolvedMysteries from TOML config
This post was pinned by moderators. Skipping...
This post was pinned by moderators. Skipping...
Post is too long (6507), try with a different post. (1600 character limit)
Post is too long (28475), try with a different post. (1600 character limit)
Post is too long (8936), try with a different post. (1600 character limit)
Post is too long (3376), try with a different post. (1600 character limit)
Post is too long (2267), try with a different post. (1600 character limit)
Post is too long (2499), try with a different post. (1600 character limit)
Post is too long (15589), try with a different post. (1600 character limit)
Post is too long (11300), try with a different post. (1600 character limit)
Post is too long (5911), try with a different post. (1600 character limit)
Post is too long (3381), try with a different post. (1600 character limit)
Post is too long (3500), try with a different post. (1600 character limit)
Post is too long (4683), try with a different post. (1600 character limit)
Post is too long (4750), try with a different post. (1600 character limit)
Post is too long (3978), try with a different post. (1600 character limit)
Post is too long (5119), try with a different post. (1600 character limit)
Post is too long (4009), try with a different post. (1600 character limit)
Post is too long (6994), try with a different post. (1600 character limit)
Video will be: Meta Monday! - January 06, 2025 Talk about anything that interests you; what's going on in your world? 👍
Thread url is: https://new.reddit.com//r/UnresolvedMysteries/comments/1huxf7q/meta_monday_january_06_2025_talk_about_anything/ 👍
Thread has 18 upvotes
Thread has a upvote ratio of 83.0%
Thread has 5 comments
Received subreddit threads Successfully.
Thread ID is 1huxf7q
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Saving Text to MP3 files...                                                                                                                               │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 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': True, 'storymodemethod': 1, 'storymode_max_length': 1600,   │
│ 'resolution_w': 1080, 'resolution_h': 1920, 'zoom': 1.0, 'channel_name': 'ThreadVault', 'background': {'background_video': 'minecraft-2',                 │
│ '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': 'Adam', '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}}                                                                                                             │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
  File "C:\Users\Shivansh Pandey\Downloads\RedditVideoMakerBot-3.3.0\RedditVideoMakerBot-3.3.0\main.py", line 131, in <module>
    raise err
  File "C:\Users\Shivansh Pandey\Downloads\RedditVideoMakerBot-3.3.0\RedditVideoMakerBot-3.3.0\main.py", line 113, in <module>
    run_many(config["settings"]["times_to_run"])
  File "C:\Users\Shivansh Pandey\Downloads\RedditVideoMakerBot-3.3.0\RedditVideoMakerBot-3.3.0\main.py", line 68, in run_many
    main()
  File "C:\Users\Shivansh Pandey\Downloads\RedditVideoMakerBot-3.3.0\RedditVideoMakerBot-3.3.0\main.py", line 50, in main
    length, number_of_comments = save_text_to_mp3(reddit_object)
  File "C:\Users\Shivansh Pandey\Downloads\RedditVideoMakerBot-3.3.0\RedditVideoMakerBot-3.3.0\video_creation\voices.py", line 49, in save_text_to_mp3
    return text_to_mp3.run()
  File "C:\Users\Shivansh Pandey\Downloads\RedditVideoMakerBot-3.3.0\RedditVideoMakerBot-3.3.0\TTS\engine_wrapper.py", line 74, in run
    self.call_tts("title", process_text(self.reddit_object["thread_title"]))
  File "C:\Users\Shivansh Pandey\Downloads\RedditVideoMakerBot-3.3.0\RedditVideoMakerBot-3.3.0\TTS\engine_wrapper.py", line 147, in call_tts
    self.tts_module.run(
TypeError: GTTS.run() got an unexpected keyword argument 'random_voice'

C:\Users\Shivansh Pandey\Downloads\RedditVideoMakerBot-3.3.0\RedditVideoMakerBot-3.3.0>

Reproduction Steps

I used google translate as TTS

Expected behavior

I expect it to generate video using google translate TTS service but it fails

Screenshots

No response

System Information

Operating System : [e.g. Windows 11]
Python version : [e.g. Python 3.10]
App version / Branch : [e.g. latest, V2.0, master, develop]

Checklist

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

Additional Context

No response

@Shivansh-Pandey Shivansh-Pandey added the bug Something isn't working label Jan 13, 2025
@Shivansh-Pandey
Copy link
Author

Same error when kept random_voice= false

@tkhmielnitzk
Copy link

tkhmielnitzk commented Jan 19, 2025

in the script "GTTS.py",
i replaced the line "def run(self, text, filepath):" by "def run(self, text, filepath, random_voice: bool = False):"
and it worked well

@JasonLovesDoggo
Copy link
Collaborator

fixed in latest update. Please update your bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants