RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

Error in Polly voice

Open kun-create opened this issue 4 years ago • 5 comments

When use polly it's give this error.

None defined. Defaulting to 'polly.'
Traceback (most recent call last):
  File "/home/june/.local/lib/python3.10/site-packages/mutagen/_util.py", line 251, in _openfile
    fileobj = open(filename, "rb+" if writable else "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'assets/temp/mp3/title.mp3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/june/Desktop/RedditVideoMakerBot-master/main.py", line 71, in <module>
    main()
  File "/home/june/Desktop/RedditVideoMakerBot-master/main.py", line 49, in main
    length, number_of_comments = save_text_to_mp3(reddit_object)
  File "/home/june/Desktop/RedditVideoMakerBot-master/video_creation/voices.py", line 39, in save_text_to_mp3
    length += MP3("assets/temp/mp3/title.mp3").info.length
  File "/home/june/.local/lib/python3.10/site-packages/mutagen/_file.py", line 48, in __init__
    self.load(*args, **kwargs)
  File "/home/june/.local/lib/python3.10/site-packages/mutagen/_util.py", line 154, in wrapper
    with _openfile(self, filething, filename, fileobj,
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/june/.local/lib/python3.10/site-packages/mutagen/_util.py", line 272, in _openfile
    raise MutagenError(e)
mutagen.MutagenError: [Errno 2] No such file or directory: 'assets/temp/mp3/title.mp3'

Maybe this url not working : self.url = "https://streamlabs.com/polly/speak" in POLLY.py

kun-create avatar Jun 29 '22 11:06 kun-create

Can you paste here the environment variables you are using to set TTsChoice to Polly?

vitviki avatar Jun 29 '22 14:06 vitviki

TTsChoice = "polly"

OR, In swapper.py default is Polly.

As per this line:

CHOICE_DIR = {"tiktok": TikTok, "gtts": GTTS, "polly": POLLY}

If I choose tiktok or gtts it's doesn't show any errors. Main issue when try to use polly

kun-create avatar Jun 29 '22 14:06 kun-create

deleting the .env file and filling the template again as stated in #671 seemed to solve it for me. might be worth a shot.

adi6409 avatar Jun 30 '22 04:06 adi6409

I found that. If I don't use VOICE="Matthew" on .env It doesn't work with Polly's voice. Need some improvement in POLLY.py to handle this situation.

kun-create avatar Jun 30 '22 10:06 kun-create

Fixed in develop

JasonLovesDoggo avatar Jul 05 '22 00:07 JasonLovesDoggo